1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_hash.rb: add a test for enumeration order of Hash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
glass 2013-07-30 13:25:40 +00:00
parent 1c3ea43f1b
commit d82e5cc4cc
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Tue Jul 30 22:21:54 2013 Masaki Matsushita <glass.saga@gmail.com>
* test/ruby/test_hash.rb: add a test for enumeration order of Hash.
Tue Jul 30 18:52:27 2013 Akinori MUSHA <knu@iDaemons.org>
* lib/set.rb (Set#intersect?, Set#disjoint?): Add new methods for

View file

@ -354,6 +354,11 @@ class TestHash < Test::Unit::TestCase
assert_equal(v, h.delete(k))
end
assert_equal(@cls[], h)
h = @cls[]
h[1] = 1
h[2] = 2
assert_equal([[1,1],[2,2]], h.each.to_a)
end
def test_each_key