Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo committed Oct 25, 2023
1 parent c738e17 commit 5ea82b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/qenv-eval_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ setMethod("eval_code", signature = c("qenv", "character"), function(object, code
{
eval(single_call, envir = object@env)
if (!identical(parent.env(object@env), parent.env(.GlobalEnv))) {
# needed to make sure that @env is always a sibling of .GlobalEnv
# could be changed when any new package is added to search path (through library or require call)
parent.env(object@env) <- parent.env(.GlobalEnv)
}
NULL
Expand Down

0 comments on commit 5ea82b4

Please sign in to comment.