From 78029f00d5e330ea7bb594d1abef54e490effc2d Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 5 Jun 2007 17:26:00 +0000 Subject: * parse.y (new_yield), compile.c (iseq_compile_each): fix passing parameter. * eval.c, eval_jump.h: simplify rb_yield*. * proc.c (proc_mark): fix to mark proc->block.proc. * proc.c (Init_Proc): add Proc#lambda? * test/ruby/test_lambda.rb: add some tests. * vm.c (invoke_block): fix to check lambda block or not. * vm.c (th_yield_setup_args): fix to check arguments size when lambda block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index e1c3432a6c..e35360a9e1 100644 --- a/compile.c +++ b/compile.c @@ -3767,13 +3767,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) /* count argc */ } - if (argc == 1) { - COMPILE(args, "yield with an arg", node->nd_head); - } - else { - compile_array(iseq, args, node->nd_head, Qfalse); - POP_ELEMENT(args); - } + compile_array(iseq, args, node->nd_head, Qfalse); + POP_ELEMENT(args); debugs("argc: %d\n", argc); } else { -- cgit v1.2.3