diff --git a/ChangeLog b/ChangeLog index 1a00d98796..fd7f1b3625 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 22 16:27:57 2008 Nobuyoshi Nakada + + * vm_insnhelper.c (vm_yield_setup_args): should not drop arguments + corresponding to default paramters. + Wed Oct 22 14:59:30 2008 Yukihiro Matsumoto * parse.y (f_larglist): should not allow semicolon separated local diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 553883c035..2e862492f3 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 {