diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_hash.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 1806746ef2..f1eef88d99 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -325,6 +325,15 @@ class TestHash < Test::Unit::TestCase end end + def test_dup_equality + h = {'k' => 'v'} + assert_equal(h, h.dup) + h1 = {h => 1} + assert_equal(h1, h1.dup) + h[1] = 2 + assert_equal(h1, h1.dup) + end + def test_each count = 0 @cls[].each { |k, v| count + 1 } |