diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-05 17:26:00 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-05 17:26:00 +0000 |
commit | 78029f00d5e330ea7bb594d1abef54e490effc2d (patch) | |
tree | eb64aff859d41df51655b33169b0e019892e3cf4 /compile.c | |
parent | d686a73d917ef73bd969c2085b89114f1a2ed2ea (diff) | |
download | ruby-78029f00d5e330ea7bb594d1abef54e490effc2d.tar.gz |
* 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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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 { |