From 7567fbf080552e04df4b5d2af9d601cf1d345b11 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 15 Jun 2007 03:27:33 +0000 Subject: * vm.c (th_yield_setup_args): |v| should work as |v,|. ex) def m;yield 1, 2; end; m{|v| p v} #=> 1 * parse.y: apply above change for "for" statement. * test/ruby/test_assignment.rb: ditto * test/ruby/test_basicinstructions.rb: ditto. * test/ruby/test_iterator.rb: ditto. * test/ruby/test_yield.rb: ditto. * compile.c (iseq_compile_each): fix debug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 94d3034dbf..7bd77399ee 100644 --- a/vm.c +++ b/vm.c @@ -718,17 +718,6 @@ th_yield_setup_args(rb_thread_t *th, rb_iseq_t *iseq, } if (iseq->arg_rest == -1) { - if (lambda == 0 && iseq->argc == 1) { - if (argc > 1) { - /* yield 1, 2, 3 for iter{|a| ...} - * - * ruby 1.8 warns on this timing. - * rb_warn("multiple values for a block parameter (%d for %d)", argc, iseq->argc); - */ - argv[0] = rb_ary_new4(argc, argv); - th->mark_stack_len = argc = 1; - } - } if (iseq->argc < argc) { if (lambda) { -- cgit v1.2.3