mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-hash-ext/test: test Hash#compact! returns nil if unmodified
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user