mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
merge GH-558
* test/ruby/test_enumerator.rb (test_iterators): fix test for hash iterators. [Fixes GH-558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b39eabac5d
commit
21759a08b3
2 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,7 @@ class TestEnumerator < Test::Unit::TestCase
|
|||
def test_iterators
|
||||
assert_equal [0, 1, 2], enum_test(3.times)
|
||||
assert_equal [:x, :y, :z], enum_test([:x, :y, :z].each)
|
||||
assert_equal [[:x, 1], [:y, 2]], enum_test({:x=>1, :y=>2})
|
||||
assert_equal [[:x, 1], [:y, 2]], enum_test({:x=>1, :y=>2}.each)
|
||||
end
|
||||
|
||||
## Enumerator as Iterator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue