aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_hash.rb9
2 files changed, 14 insertions, 0 deletions
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 <usa@ruby-lang.org>
+
+ * 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 <shugo@ruby-lang.org>
* 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 }