diff options
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -4285,8 +4285,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) ADD_INSN(ret, nd_line(node), putnil); ADD_SEQ(ret, recv); ADD_SEQ(ret, args); + + if (flag & VM_CALL_ARGS_BLOCKARG_BIT) { + ADD_INSN1(ret, nd_line(node), topn, INT2FIX(1)); + ADD_INSN1(ret, nd_line(node), setn, INT2FIX(FIX2INT(argc) + 3)); + ADD_INSN (ret, nd_line(node), pop); + } + else { ADD_INSN1(ret, nd_line(node), setn, INT2FIX(FIX2INT(argc) + 1)); } + } else { ADD_SEQ(ret, recv); ADD_SEQ(ret, args); |