diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-09 06:26:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-09 06:26:15 +0000 |
commit | f4c52b483cb4794e3e0e526a084cdbd32da8086c (patch) | |
tree | 9bb6b87176fd2c1f03723733ef90eeafb5adc3af /compile.c | |
parent | 0a4ed02461f9a7fee0da33282a6ede600b90e928 (diff) |
compile.c: append keyword hash to splat
* 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/trunk@40205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4499,6 +4499,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; + } } } } |