summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 3c62d614a7..5896d9713a 100644
--- a/compile.c
+++ b/compile.c
@@ -5074,7 +5074,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (liseq->body->param.flags.has_rest) {
/* rest argument */
int idx = liseq->body->local_size - liseq->body->param.rest_start;
+
ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ ADD_INSN1(args, line, splatarray, Qfalse);
+
argc = liseq->body->param.rest_start + 1;
flag |= VM_CALL_ARGS_SPLAT;
}