aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 920d933f76..782edc9a0c 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -898,8 +898,10 @@ class TestHash < Test::Unit::TestCase
assert_nothing_raised { eval("a = 1; {a => a}; a") }
end
- def test_recursive_check
+ def test_recursive_key
h = {}
- assert_raise(ArgumentError) { h[h] = :foo }
+ assert_nothing_raised { h[h] = :foo }
+ h.rehash
+ assert_equal(:foo, h[h])
end
end