summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-09-03 11:22:08 -0400
committerKevin Newton <[email protected]>2024-09-03 12:12:08 -0400
commitf7b097dea0491410dbb98db792c29d87abf888a6 (patch)
treec745e2c871338a252b87dd75f68f38582527dae5 /vm_eval.c
parentf1349924df3b5e9ff2a06453a142a914d5a2799f (diff)
[PRISM] Keep script lines option for eval iseqs as well
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11534
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 9834b7ff9e..807f322854 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1719,7 +1719,9 @@ pm_eval_make_iseq(VALUE src, VALUE fname, int line,
// Add our empty local scope at the very end of the array for our eval
// scope's locals.
pm_options_scope_init(&result.options.scopes[scopes_count], 0);
- VALUE error = pm_parse_string(&result, src, fname, NULL);
+
+ VALUE script_lines;
+ VALUE error = pm_parse_string(&result, src, fname, ruby_vm_keep_script_lines ? &script_lines : NULL);
// If the parse failed, clean up and raise.
if (error != Qnil) {