Skip to content

Commit

Permalink
Use bquote
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Aug 21, 2024
1 parent e615901 commit 8ae1af2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/conditions.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sanitize_call <- function(cnd) {
if (identical(cnd$call, quote(withVisible(do)))) {
cnd$call <- NULL
}
if (identical(cnd$call, quote(eval(substitute(context()), envir)))) {
if (identical(cnd$call, quote(eval(bquote(.(context)()), envir)))) {
cnd$call <- NULL
}

Expand Down
2 changes: 1 addition & 1 deletion R/evaluate.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ evaluate <- function(input,

# Here we use `eval()` to create an unwinding scope for `envir`, using
# an inlined call to `context()`.
eval(substitute(context()), envir)
eval(bquote(.(context)()), envir)
watcher$capture_output()

# Always capture last plot, even if incomplete
Expand Down

0 comments on commit 8ae1af2

Please sign in to comment.