mruby-hash-ext/test: test Hash#compact! returns nil if unmodified

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-02-02 22:42:36 +09:00
parent 0a1fd07910
commit 9cda737a56
+2 -2
View File
@@ -89,8 +89,8 @@ end
assert('Hash#compact!') do
h = { "cat" => "feline", "dog" => nil, "cow" => false }
h.compact!
assert_equal({ "cat" => "feline", "cow" => false }, h)
assert_equal({ "cat" => "feline", "cow" => false }, h.compact!)
assert_nil(h.compact!)
end
assert('Hash#fetch') do