summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-19 16:02:09 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-19 16:02:09 +0000
commita569165d3e6ef80fef747a33d8c47325e23c4430 (patch)
tree37d4da89d5d430e633941f87c09823fd36646271 /compile.c
parent1ccf489ad5ecac4c215d65d306e5b38c06657b8f (diff)
merge revision(s) 40205: [Backport #8236]
* compile.c (iseq_compile_each): append keyword hash to argument array to splat if needed. [ruby-core:54094] [Bug #8236] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 2753cf80eb..34c9ae2b37 100644
--- a/compile.c
+++ b/compile.c
@@ -4485,6 +4485,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
ADD_SEND(args, line, ID2SYM(id_core_hash_merge_ptr), INT2FIX(i * 2 + 1));
+ if (liseq->arg_rest != -1) {
+ ADD_INSN1(args, line, newarray, INT2FIX(1));
+ ADD_INSN (args, line, concatarray);
+ --argc;
+ }
}
}
}