diff options
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r-- | test/ruby/test_hash.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 7720b6098e..c0ccd65fca 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -358,8 +358,9 @@ class TestHash < Test::Unit::TestCase h = @cls[a: 1, b: nil, c: false, d: true, e: nil] assert_equal({a: 1, c: false, d: true}, h.compact) assert_equal({a: 1, b: nil, c: false, d: true, e: nil}, h) - h.compact! + assert_same(h, h.compact!) assert_equal({a: 1, c: false, d: true}, h) + assert_nil(h.compact!) end def test_dup |