diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-01 08:21:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-01 08:21:37 +0000 |
commit | 767c502252daf751a2efbd0acc5766cd5492e9fb (patch) | |
tree | f809a6dd5479c259b20500f3d9939b17c3ce482d /vm_insnhelper.c | |
parent | a10ea5b94db88c78ec04af7b8861a22d90a9ce67 (diff) | |
download | ruby-767c502252daf751a2efbd0acc5766cd5492e9fb.tar.gz |
vm_insnhelper.c: add comments
* vm_insnhelper.c (vm_yield_setup_block_args): break a long line and
add comments. remove useless code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 1d901c22e8..b519670370 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2205,7 +2205,9 @@ 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 || iseq->arg_opts > 2) && /* this process is meaningful */ + ((m + iseq->arg_post_len) > 0 || /* positional arguments exist */ + iseq->arg_opts > 2 || /* multiple optional arguments exist */ + 0) && argc == 1 && !NIL_P(ary = rb_check_array_type(arg0))) { /* rhs is only an array */ th->mark_stack_len = argc = RARRAY_LENINT(ary); @@ -2213,9 +2215,6 @@ vm_yield_setup_block_args(rb_thread_t *th, const rb_iseq_t * iseq, MEMCPY(argv, RARRAY_PTR(ary), VALUE, argc); } - else { - argv[0] = arg0; - } for (i=argc; i<m; i++) { argv[i] = Qnil; |