diff options
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r-- | test/ruby/test_hash.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 0593785148..afb0ca4805 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -592,6 +592,16 @@ class TestHash < Test::Unit::TestCase assert_nil(h[2]) end + def test_replace_bug9230 + h = @cls[] + h.replace(@cls[]) + assert_empty h + + h = @cls[] + h.replace(@cls[].compare_by_identity) + assert_predicate(h, :compare_by_identity?) + end + def test_shift h = @h.dup |