summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-02-08 13:19:51 -0500
committerKevin Newton <[email protected]>2024-02-08 14:36:39 -0500
commit4a40364c62ee4689bb95e6c26669a28861b6bc8b (patch)
treed896e64e9747848dd411f029a37a373b5a634e83 /ruby.c
parent3ecfc3e33ef7db8e9f855490910077ac7ed13434 (diff)
[PRISM] Run opt init before parsing
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 2e95b37173..4c9bf4349a 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2407,6 +2407,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
const struct rb_block *base_block = toplevel_context(toplevel_binding);
if ((*rb_ruby_prism_ptr())) {
+ ruby_opt_init(opt);
pm_parse_result_t result = { 0 };
VALUE error;
@@ -2441,7 +2442,6 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
}
if (error == Qnil) {
- ruby_opt_init(opt);
iseq = pm_iseq_new_main(&result.node, opt->script_name, path, vm_block_iseq(base_block), !(dump & DUMP_BIT(insns_without_opt)));
pm_parse_result_free(&result);
}