diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-28 07:31:10 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-28 07:31:10 +0000 |
commit | c2aef47c846e1ff2ddcc2059c36b494859d740f6 (patch) | |
tree | 18f3f7a1d565e04e5a20d43ee507aa4ece78ea18 /insnhelper.ci | |
parent | 49b1513d1e7fe5e8ce440a19c77865b74ee6ed87 (diff) |
* insnhelper.ci (vm_invoke_block): should splat args.
[ruby-dev:32392]
* test/ruby/test_yield.rb: add tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.ci')
-rw-r--r-- | insnhelper.ci | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/insnhelper.ci b/insnhelper.ci index 1518afa8b1..12ce484612 100644 --- a/insnhelper.ci +++ b/insnhelper.ci @@ -798,13 +798,12 @@ vm_invoke_block(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_num_t num, rb_n } iseq = block->iseq; + argc = caller_setup_args(th, GET_CFP(), flag, argc, 0, 0); + if (BUILTIN_TYPE(iseq) != T_NODE) { int opt_pc; - argc = caller_setup_args(th, GET_CFP(), flag, argc, 0, 0); - CHECK_STACK_OVERFLOW(GET_CFP(), iseq->stack_max); - DEC_SP(argc); opt_pc = vm_yield_setup_args(th, iseq, argc, GET_SP(), 0, block_proc_is_lambda(block->proc)); @@ -820,8 +819,8 @@ vm_invoke_block(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_num_t num, rb_n return Qundef; } else { - val = vm_yield_with_cfunc(th, block, block->self, num, STACK_ADDR_FROM_TOP(num)); - POPN(num); /* TODO: should put before C/yield? */ + val = vm_yield_with_cfunc(th, block, block->self, argc, STACK_ADDR_FROM_TOP(argc)); + POPN(argc); /* TODO: should put before C/yield? */ return val; } } |