summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/hash.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/hash.rb b/test/t/hash.rb
index 39f9ae9d8..837fe0216 100644
--- a/test/t/hash.rb
+++ b/test/t/hash.rb
@@ -34,6 +34,13 @@ assert('Hash#clear', '15.2.13.4.4') do
assert_equal({ }, a)
end
+assert('Hash#dup') do
+ a = { 'a' => 1 }
+ b = a.dup
+ a['a'] = 2
+ assert_equal(b, {'a' => 1})
+end
+
assert('Hash#default', '15.2.13.4.5') do
a = Hash.new
b = Hash.new('abc')