diff options
author | tompng <[email protected]> | 2024-08-06 23:29:45 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-08-12 18:09:32 +0900 |
commit | 992596fb7af18a7f472589a607d0eb3fbb03b49a (patch) | |
tree | 609d85d4553880bba35dba01bda5e792a5e9b0b9 /compile.c | |
parent | 2a7da0b6e76929c684cd948630a897c1d5b16c26 (diff) |
Fix next inside block argument stack underflow
[Bug #20344]
Fix compile_next adding removable adjust label
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11316
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -3070,8 +3070,7 @@ remove_unreachable_chunk(rb_iseq_t *iseq, LINK_ELEMENT *i) /* do nothing */ } else if (IS_ADJUST(i)) { - LABEL *dest = ((ADJUST *)i)->label; - if (dest && dest->unremovable) return 0; + return 0; } end = i; } while ((i = i->next) != 0); @@ -8205,7 +8204,6 @@ compile_next(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in add_ensure_iseq(ret, iseq, 0); ADD_INSNL(ret, line_node, jump, ISEQ_COMPILE_DATA(iseq)->end_label); ADD_ADJUST_RESTORE(ret, splabel); - splabel->unremovable = FALSE; if (!popped) { ADD_INSN(ret, line_node, putnil); |