summaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-22 07:28:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-22 07:28:00 +0000
commitb31a4e2f7179a0a1bcf020cf58f2e34bf359153d (patch)
tree4622008d818e3118bf286515dc2c2f80022b828f /vm_insnhelper.c
parentd4a1a2ab7354bec3d1fe42a9de4bc1fb9fe06413 (diff)
downloadruby-b31a4e2f7179a0a1bcf020cf58f2e34bf359153d.tar.gz
ruby-b31a4e2f7179a0a1bcf020cf58f2e34bf359153d.tar.xz
ruby-b31a4e2f7179a0a1bcf020cf58f2e34bf359153d.zip
* vm_insnhelper.c (vm_yield_setup_args): should not drop arguments
corresponding to default paramters. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 553883c03..2e862492f 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -728,12 +728,13 @@ vm_yield_setup_args(rb_thread_t * const th, const rb_iseq_t *iseq,
}
if (iseq->arg_rest == -1) {
- if (m < argc) {
+ const int arg_size = iseq->arg_size;
+ if (arg_size < argc) {
/*
* yield 1, 2
* => {|a|} # truncate
*/
- th->mark_stack_len = argc = m;
+ th->mark_stack_len = argc = arg_size;
}
}
else {