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
|
@ -621,8 +621,8 @@ class TestBasicInstructions < Test::Unit::TestCase
|
|||
assert_equal [1, 2, 3], [1, *a]
|
||||
|
||||
a = nil
|
||||
assert_equal [nil], [*a] # FIXME: []? [nil]? error?
|
||||
assert_equal [1], [1, *a] # FIXME: [1, nil]? error?
|
||||
assert_equal [], [*a]
|
||||
assert_equal [1], [1, *a]
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue