Commit a41b61ea authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2960 from suzukaze/refactor-hash-ext-test

Refator Hash#fetch test
parents 6c785891 570c2615
......@@ -76,10 +76,8 @@ assert('Hash#fetch') do
assert_equal "mickey", h.fetch("mouse", "mickey")
assert_equal "minny", h.fetch("mouse"){"minny"}
assert_equal "mouse", h.fetch("mouse"){|k| k}
begin
assert_raise(KeyError) do
h.fetch("gnu")
rescue => e
assert_kind_of(KeyError, e);
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment