Skip to content

Commit eaa4dc8

Browse files
authored
Merge pull request #135 from JuliaIO/teh/0.7
Add module to `isdefined` calls
2 parents 530ed87 + 238d34f commit eaa4dc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/loadsave.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const sym2loader = Dict{Symbol,Vector{Symbol}}()
22
const sym2saver = Dict{Symbol,Vector{Symbol}}()
33

44
function is_installed(pkg::Symbol)
5-
isdefined(pkg) && isa(getfield(Main, pkg), Module) && return true # is a module defined in Main scope
5+
isdefined(Main, pkg) && isa(getfield(Main, pkg), Module) && return true # is a module defined in Main scope
66
path = Base.find_in_path(string(pkg)) # hacky way to determine if a Package is installed
77
path == nothing && return false
88
return isfile(path)

test/query.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ try
251251
a = read(io, Int)
252252
@test a == 42 #make sure that LoadTest2 is used for saving, even though its at position 2
253253
end
254-
@test isdefined(:LoadTest1) # first module should load first but fail
254+
@test isdefined(Main, :LoadTest1) # first module should load first but fail
255255
@test x == 42
256256
rm(fn)
257257
end

0 commit comments

Comments
 (0)