Fix coding issue in prism_compile.c

Make sure to set back `ISEQ_COMPILE_DATA(iseq)->current_block` for
forwarding super nodes with a block.

Fixes [Bug #20740]
This commit is contained in:
Luke Gruber 2024-09-13 12:42:56 -04:00 committed by Kevin Newton
parent 96da3f16a0
commit c14b60630d
Notes: git 2024-09-18 15:53:15 +00:00

View File

@ -8057,6 +8057,9 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
PUSH_GETLOCAL(ret, location, mult_local.index, mult_local.level);
PUSH_INSN2(ret, location, invokesuperforward, new_callinfo(iseq, 0, 0, flag, NULL, block != NULL), block);
if (popped) PUSH_INSN(ret, location, pop);
if (cast->block) {
ISEQ_COMPILE_DATA(iseq)->current_block = previous_block;
}
return;
}