summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-12 15:03:22 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-12 15:03:22 +0000
commit1135cc3596e301495d2fa2230cd3411fd1f516a5 (patch)
tree81cc7c8957435771ea2b161e06c96534a11a32ee /compile.c
parent63bc35ffb00b4231beeaae8f7c9b394c107cff92 (diff)
merge revision(s) 41019,41020,41021,41041,41045,41057: [Backport #8463]
vm_insnhelper.c: add comments * vm_insnhelper.c (vm_yield_setup_block_args): break a long line and add comments. remove useless code. * vm_insnhelper.c (vm_yield_setup_block_args): split single parameter if any keyword arguments exist, and then extract keyword arguments. [ruby-core:55203] [Bug #8463] * compile.c (iseq_set_arguments): not a simple single argument if any keyword arguments exist. [ruby-core:55203] [Bug #8463] * vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019. The code is not useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 95d47f4f32..510675952c 100644
--- a/compile.c
+++ b/compile.c
@@ -1264,7 +1264,8 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
}
if (iseq->type == ISEQ_TYPE_BLOCK) {
- if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 && iseq->arg_rest == -1) {
+ if (iseq->arg_opts == 0 && iseq->arg_post_len == 0 &&
+ iseq->arg_rest == -1 && iseq->arg_keyword == -1) {
if (iseq->argc == 1 && last_comma == 0) {
/* {|a|} */
iseq->arg_simple |= 0x02;