summaryrefslogtreecommitdiff
path: root/insnhelper.ci
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-16 16:29:11 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-16 16:29:11 +0000
commitfc466622fd220b1d907d86cdbc3f74acc11a58ca (patch)
tree2fef8bcf0c79b10b3b163e66ffcdca995f8b160a /insnhelper.ci
parent4657257b75ff1d88e2653e4c408b0d98e7fbdc9a (diff)
* compile.c (iseq_set_arguments), insnhelper.ci
(vm_callee_setup_arg, vm_yield_setup_args): fix block parameter problems. [ruby-dev:31437], [ruby-dev:31440] * bootstraptest/test_block.rb: add a test of [ruby-dev:31440]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.ci')
-rw-r--r--insnhelper.ci4
1 files changed, 2 insertions, 2 deletions
diff --git a/insnhelper.ci b/insnhelper.ci
index 1fda1e82fe..bb87a432a7 100644
--- a/insnhelper.ci
+++ b/insnhelper.ci
@@ -103,7 +103,7 @@ vm_callee_setup_arg(rb_thread_t *th, rb_iseq_t *iseq,
const int m = iseq->argc;
const int orig_argc = argc;
- if (iseq->arg_simple) {
+ if (iseq->arg_simple == 1) {
/* simple check */
if (argc != m) {
rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
@@ -675,7 +675,7 @@ vm_yield_setup_args(rb_thread_t *th, rb_iseq_t *iseq,
* => {|a|} => a = [1, 2]
* => {|a, b|} => a, b = [1, 2]
*/
- if (iseq->arg_simple != 2 && m > 0 && argc == 1 && TYPE(argv[0]) == T_ARRAY) {
+ if (iseq->arg_simple != 2 && (m + iseq->arg_post_len) > 0 && argc == 1 && TYPE(argv[0]) == T_ARRAY) {
VALUE ary = argv[0];
th->mark_stack_len = argc = RARRAY_LEN(ary);