diff options
author | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-30 13:25:40 +0000 |
---|---|---|
committer | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-30 13:25:40 +0000 |
commit | d82e5cc4cc0c3340a9fa92f795751d495e13efe1 (patch) | |
tree | b9f024e56469d2e7ab49800bf1d5c50224ecf903 | |
parent | 1c3ea43f1b03f9058a578a566c0c4c1b8c578b63 (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | test/ruby/test_hash.rb | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -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 diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 58a874bd30..21fbf410ff 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -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 |