summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/hash.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/hash.rb b/test/t/hash.rb
index b455812cf..f076db8e5 100644
--- a/test/t/hash.rb
+++ b/test/t/hash.rb
@@ -44,6 +44,10 @@ assert('Hash#dup') do
b = a.dup
a['a'] = 2
assert_equal({'a' => 1}, b)
+
+ c = Hash.new { |h, k| h[k] = k.upcase }
+ d = c.dup
+ assert_equal("FOO", d["foo"])
end
assert('Hash#default', '15.2.13.4.5') do