ruby-changes:30204
From: glass <ko1@a...>
Date: Tue, 30 Jul 2013 22:26:38 +0900 (JST)
Subject: [ruby-changes:30204] glass:r42256 (trunk): * test/ruby/test_hash.rb: add a test for enumeration order of Hash.
glass 2013-07-30 22:25:40 +0900 (Tue, 30 Jul 2013) New Revision: 42256 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42256 Log: * test/ruby/test_hash.rb: add a test for enumeration order of Hash. Modified files: trunk/ChangeLog trunk/test/ruby/test_hash.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 42255) +++ ChangeLog (revision 42256) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Jul 30 22:21:54 2013 Masaki Matsushita <glass.saga@g...> + + * test/ruby/test_hash.rb: add a test for enumeration order of Hash. + Tue Jul 30 18:52:27 2013 Akinori MUSHA <knu@i...> * lib/set.rb (Set#intersect?, Set#disjoint?): Add new methods for Index: test/ruby/test_hash.rb =================================================================== --- test/ruby/test_hash.rb (revision 42255) +++ test/ruby/test_hash.rb (revision 42256) @@ -354,6 +354,11 @@ class TestHash < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_hash.rb#L354 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/