diff options
author | Aaron Patterson <[email protected]> | 2025-04-29 10:02:00 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2025-04-29 13:33:23 -0700 |
commit | 203614080f2e944abb190a130b07685b0373da03 () | |
tree | 3b40d718a2fb6dc0470c444e5326f5d2db33e4fd /prism_compile.c | |
parent | e6974be5458907d4e809a84d775c3e6b7f4fcea9 (diff) |
opt_new needs to happen after safe navigation
If safe navigation instructions happen first, we get a stack inconsistency error.
Notes: Merged: https://.com/ruby/ruby/pull/13205
-rw-r--r-- | prism_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3621,8 +3621,6 @@ pm_compile_call(rb_iseq_t *iseq, const pm_call_node_t *call_node, LINK_ANCHOR *c const pm_node_location_t location = PM_LOCATION_START_LOCATION(scope_node->parser, message_loc, call_node->base.node_id); - LINK_ELEMENT *opt_new_prelude = LAST_ELEMENT(ret); - LABEL *else_label = NEW_LABEL(location.line); LABEL *end_label = NEW_LABEL(location.line); LABEL *retry_end_l = NEW_LABEL(location.line); @@ -3661,6 +3659,8 @@ pm_compile_call(rb_iseq_t *iseq, const pm_call_node_t *call_node, LINK_ANCHOR *c add_trace_branch_coverage(iseq, ret, &code_location, node_id, 0, "then", branches); } int flags = 0; struct rb_callinfo_kwarg *kw_arg = NULL; |