From 09753e70c0386a28a2c374f4ac57aba0aee599c4 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 1 Nov 2024 16:46:55 -0500 Subject: [PATCH] correctly revert original changes --- R/block.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/block.R b/R/block.R index 1e6799f352..14e3d0f10c 100644 --- a/R/block.R +++ b/R/block.R @@ -187,7 +187,8 @@ block_exec = function(options) { #' @noRd eng_r = function(options) { # eval chunks (in an empty envir if cache) - obj.before = ls(knit_global(), all.names = TRUE) # global objects before chunk + env = knit_global() + obj.before = ls(globalenv(), all.names = TRUE) # global objects before chunk keep = options$fig.keep keep.idx = NULL