summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 94b5daeec0..7c1c359b22 100644
--- a/compile.c
+++ b/compile.c
@@ -6221,7 +6221,9 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in
if (liseq->body->param.flags.has_rest) {
/* rest argument */
int idx = liseq->body->local_table_size - liseq->body->param.rest_start;
+
ADD_GETLOCAL(args, line, idx, lvar_level);
+ ADD_INSN1(args, line, splatarray, Qfalse);
argc = liseq->body->param.rest_start + 1;
flag |= VM_CALL_ARGS_SPLAT;