1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_insnhelper.c: use update argc

* vm_insnhelper.c (vm_invoke_block): use ci->argc updated by
  CALLER_SETUP_ARG().  [Bug #11451]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-21 15:31:39 +00:00
parent 885d781abc
commit 9c7bf9494b

View file

@ -2336,9 +2336,9 @@ vm_invoke_block(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci
} }
else { else {
VALUE val; VALUE val;
int argc = ci->argc; int argc;
CALLER_SETUP_ARG(th->cfp, ci); CALLER_SETUP_ARG(th->cfp, ci);
argc = ci->argc;
val = vm_yield_with_cfunc(th, block, block->self, argc, STACK_ADDR_FROM_TOP(argc), 0); val = vm_yield_with_cfunc(th, block, block->self, argc, STACK_ADDR_FROM_TOP(argc), 0);
POPN(argc); /* TODO: should put before C/yield? */ POPN(argc); /* TODO: should put before C/yield? */
return val; return val;