Skip to content

Commit b01991a

Browse files
authored
Merge pull request #131 from serenity4/fix-global-assignment
Add `global` qualifier to inserted globals
2 parents f0ae6b9 + a939036 commit b01991a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Infiltrator.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ function init_transient_eval_module(mod, locals)
530530
# insert variables in safehouse
531531
Core.eval(newmod, Expr(:block, map(x->Expr(:(=), x...), [(k, maybe_quote(v)) for (k, v) in get_store_names() if !isdefined(newmod, k)])...))
532532
# insert all bindings from the source module that aren't already defined in the eval module
533-
Core.eval(newmod, Expr(:block, map(x->Expr(:(=), x...), [(k, maybe_quote(v)) for (k, v) in modns if !isdefined(newmod, k)])...))
533+
Core.eval(newmod, Expr(:block, map(x->Expr(:global, Expr(:(=), x...)), [(k, maybe_quote(v)) for (k, v) in modns if !isdefined(newmod, k)])...))
534534

535535
return newmod
536536
end

0 commit comments

Comments
 (0)