Skip to content

Commit

Permalink
Merge pull request #19909 from JuliaLang/sk/include1only
Browse files Browse the repository at this point in the history
include: deprecate multi-argument method of include
  • Loading branch information
kshyatt authored Jan 8, 2017
2 parents 23c5450 + 5d5881d commit 69c1c8f
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -545,22 +545,16 @@ function include_from_node1(_path::String)
end

"""
include(path::AbstractString...)
Evaluate the contents of the input source file(s) in the current context. Returns the result
of the last evaluated argument (of the last input file). During including, a
task-local include path is set to the directory containing the file. Nested calls to
`include` will search relative to that path. All paths refer to files on node 1 when running
in parallel, and files will be fetched from node 1. This function is typically used to load
source interactively, or to combine files in packages that are broken into multiple source files.
include(path::AbstractString)
Evaluate the contents of the input source file in the current context. Returns the result
of the last evaluated expression of the input file. During including, a task-local include
path is set to the directory containing the file. Nested calls to `include` will search
relative to that path. All paths refer to files on node 1 when running in parallel, and
files will be fetched from node 1. This function is typically used to load source
interactively, or to combine files in packages that are broken into multiple source files.
"""
function include(_path::AbstractString...)
local result
for path in _path
result = include(path)
end
result
end
include # defined in sysimg.jl

"""
evalfile(path::AbstractString, args::Vector{String}=String[])
Expand Down

0 comments on commit 69c1c8f

Please sign in to comment.