From f7b097dea0491410dbb98db792c29d87abf888a6 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 3 Sep 2024 11:22:08 -0400 Subject: [PATCH] [PRISM] Keep script lines option for eval iseqs as well --- vm_eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {