diff --git a/ChangeLog b/ChangeLog index c4dbe53ce7..58d0dcad5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 17 11:04:48 2012 NAKAMURA Usaku + + * test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test + to show the problem of r37232. + Wed Oct 17 10:48:40 2012 Shugo Maeda * vm_insnhelper.c (vm_search_method): fix a build error that occurs 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 }