diff options
author | Kevin Newton <[email protected]> | 2025-01-05 20:42:09 -0500 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2025-01-06 13:18:22 -0500 |
commit | 31905d9e23ec6d1fa2a52f1ef2533f2056e7c9fb (patch) | |
tree | f9565a38b6a9fa47ef538ba0ce2a735436c57e18 /prism_compile.c | |
parent | a61c16ba4214da3eda45bdd2b168e7d7e8af30c5 (diff) |
Allow escaping from ensures through next
Fixes [Bug #21001]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12513
Diffstat (limited to 'prism_compile.c')
-rw-r--r-- | prism_compile.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/prism_compile.c b/prism_compile.c index db8e9cb3b2..a47e669d72 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -8720,16 +8720,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret, const pm_ensure_node_t *cast = (const pm_ensure_node_t *) node; if (cast->statements != NULL) { - LABEL *start = NEW_LABEL(location.line); - LABEL *end = NEW_LABEL(location.line); - PUSH_LABEL(ret, start); - - LABEL *prev_end_label = ISEQ_COMPILE_DATA(iseq)->end_label; - ISEQ_COMPILE_DATA(iseq)->end_label = end; - PM_COMPILE((const pm_node_t *) cast->statements); - ISEQ_COMPILE_DATA(iseq)->end_label = prev_end_label; - PUSH_LABEL(ret, end); } return; |