Skip to content

Commit c889a36

Browse files
committed
chore: minor code cleanup to avoid new function definition
1 parent 618efbb commit c889a36

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

R/qenv-eval_code.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,13 @@ setMethod("eval_code", signature = c("qenv", "expression"), function(object, cod
9999
eval_code(object, code = paste(attr(code, "wholeSrcref"), collapse = "\n"))
100100
} else {
101101
Reduce(function(u, v) {
102-
if (inherits(v, "=")) {
103-
eval_code(object, paste(vapply(lang2calls(v), deparse1, collapse = "\n", character(1L)), collapse = "\n"))
102+
f <- if (inherits(v, "=")) {
103+
# Force method to be called
104+
getMethod("eval_code", signature = c("qenv", "language"))@.Data
104105
} else {
105-
eval_code(object = u, code = v)
106+
eval_code
106107
}
108+
f(u, v)
107109
}, init = object, x = code)
108110
}
109111
})

0 commit comments

Comments
 (0)