Skip to content

Commit

Permalink
doc: add compat annotation for mapexpr argument to include(_string) (J…
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet authored and ElOceanografo committed May 4, 2021
1 parent d42c3da commit 0e7d839
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ it is evaluated: for each parsed expression `expr` in `path`, the `include` func
actually evaluates `mapexpr(expr)`. If it is omitted, `mapexpr` defaults to [`identity`](@ref).
Use [`Base.include`](@ref) to evaluate a file into another module.
!!! compat "Julia 1.5"
Julia 1.5 is required for passing the `mapexpr` argument.
"""
MainInclude.include

Expand Down
6 changes: 6 additions & 0 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,9 @@ Like [`include`](@ref), except reads code from the given string rather than from
The optional first argument `mapexpr` can be used to transform the included code before
it is evaluated: for each parsed expression `expr` in `code`, the `include_string` function
actually evaluates `mapexpr(expr)`. If it is omitted, `mapexpr` defaults to [`identity`](@ref).
!!! compat "Julia 1.5"
Julia 1.5 is required for passing the `mapexpr` argument.
"""
function include_string(mapexpr::Function, mod::Module, code::AbstractString,
filename::AbstractString="string")
Expand Down Expand Up @@ -1131,6 +1134,9 @@ interactively, or to combine files in packages that are broken into multiple sou
The optional first argument `mapexpr` can be used to transform the included code before
it is evaluated: for each parsed expression `expr` in `path`, the `include` function
actually evaluates `mapexpr(expr)`. If it is omitted, `mapexpr` defaults to [`identity`](@ref).
!!! compat "Julia 1.5"
Julia 1.5 is required for passing the `mapexpr` argument.
"""
Base.include # defined in Base.jl

Expand Down

0 comments on commit 0e7d839

Please sign in to comment.