8000 vm_insnhelper.c: add comments · plusplus/ruby@767c502 · GitHub
[go: up one dir, main page]

Skip to content

Commit 767c502

Browse files
committed
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
1 parent a10ea5b commit 767c502

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vm_insnhelper.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,17 +2205,16 @@ vm_yield_setup_block_args(rb_thread_t *th, const rb_iseq_t * iseq,
22052205
*/
22062206
arg0 = argv[0];
22072207
if (!(iseq->arg_simple & 0x02) && /* exclude {|a|} */
2208-
((m + iseq->arg_post_len) > 0 || iseq->arg_opts > 2) && /* this process is meaningful */
2208+
((m + iseq->arg_post_len) > 0 || /* positional arguments exist */
2209+
iseq->arg_opts > 2 || /* multiple optional arguments exist */
2210+
0) &&
22092211
argc == 1 && !NIL_P(ary = rb_check_array_type(arg0))) { /* rhs is only an array */
22102212
th->mark_stack_len = argc = RARRAY_LENINT(ary);
22112213

22122214
CHECK_VM_STACK_OVERFLOW(th->cfp, argc);
22132215

22142216
MEMCPY(argv, RARRAY_PTR(ary), VALUE, argc);
22152217
}
2216-
else {
2217-
argv[0] = arg0;
2218-
}
22192218

22202219
for (i=argc; i<m; i++) {
22212220
argv[i] = Qnil;

0 commit comments

Comments
 (0)
0