summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorMatt Valentine-House <[email protected]>2024-01-22 22:24:42 +0000
committerAaron Patterson <[email protected]>2024-01-22 15:15:32 -0800
commit4592fdc545284a0cbf55bd1ada17d0b98a3ae685 (patch)
tree4593a8bba3ef4efb50f1c136657ff32e62d32140 /ruby.c
parent2e2dfc46231f8b48518b109a10260933e8be523d (diff)
[Prism] path and script name are not the same
When loading Ruby from a file, or parsing using RubyVM::InstructionSequence.
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index bccc6504a0..cf82d3e0a1 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2428,7 +2428,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
}
VALUE optimize = dump & DUMP_BIT(insns_without_opt) ? Qfalse : Qnil;
- iseq = rb_iseq_new_main_prism(&input, &options, path, optimize);
+ iseq = rb_iseq_new_main_prism(&input, &options, opt->script_name, path, optimize);
ruby_opt_init(opt);
pm_string_free(&input);