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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index acff4821f5..d03783129f 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -875,4 +875,9 @@ class TestHash < Test::Unit::TestCase
def test_hash_poped
assert_nothing_raised { eval("a = 1; {a => a}; a") }
end
+
+ def test_recursive_check
+ h = {}
+ assert_raise(ArgumentError) { h[h] = :foo }
+ end
end