diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-12 20:50:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-12 20:50:09 +0000 |
commit | 50ae8a8651044de5956675ad87bc6bc2c9c32e6f (patch) | |
tree | fb2581d3b1bdcdce055e6b4b17899d1d49bdb6dd /vm_insnhelper.c | |
parent | 900b4a6db63012d9ce32a1019a7c9d5b014a0047 (diff) | |
download | ruby-50ae8a8651044de5956675ad87bc6bc2c9c32e6f.tar.gz |
* vm_insnhelper.c (vm_yield_setup_block_args): splat single
argument if optinal arguments are defined not only mandatory or
post arguments. [ruby-core:41557] [Bug #5730]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 29aee1d3d2..85b5e6ee78 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -833,7 +833,7 @@ vm_yield_setup_block_args(rb_thread_t *th, const rb_iseq_t * iseq, */ arg0 = argv[0]; if (!(iseq->arg_simple & 0x02) && /* exclude {|a|} */ - (m + iseq->arg_post_len) > 0 && /* this process is meaningful */ + (m + iseq->arg_opts + iseq->arg_post_len) > 0 && /* this process is meaningful */ argc == 1 && !NIL_P(ary = rb_check_array_type(arg0))) { /* rhs is only an array */ th->mark_stack_len = argc = RARRAY_LENINT(ary); |