summaryrefslogtreecommitdiff
path: root/prism_compile.c
diff options
context:
space:
mode:
authorLuke Gruber <[email protected]>2024-09-13 12:42:56 -0400
committerKevin Newton <[email protected]>2024-09-18 11:52:57 -0400
commitc14b60630d680addd5b4ef9c9b159a26a5446483 ()
tree4c5ade30e818a24293ed0c8aefba47c7e44ea359 /prism_compile.c
parent96da3f16a0e4ad9c14197d5ed794cecf1abf9546 (diff)
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]
Notes: Merged: https://.com/ruby/ruby/pull/11621
-rw-r--r--prism_compile.c3
1 files changed, 3 insertions, 0 deletions
@@ -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);
return;
}