mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
70df6311af
commit
7567fbf080
8 changed files with 75 additions and 34 deletions
|
|
@ -16,8 +16,8 @@ class TestRubyYield < Test::Unit::TestCase
|
|||
assert_equal :a, k
|
||||
assert_equal 1, v
|
||||
end
|
||||
h.each do |kv|
|
||||
assert_equal [:a, 1], kv
|
||||
h.each do |k|
|
||||
assert_equal :a, k # changed at 1.9
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue