summaryrefslogtreecommitdiff
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 58a874bd307..21fbf410ff8 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