Fix test after keyword argument separation

Now that keyword splats accept non-Symbols, the type of exception
changes.

Previously, a TypeError (hash key "k1" is not a Symbol) was raised
for this test, but now an ArgumentError (unknown keyword: "k1") is
raised.
This commit is contained in:
Jeremy Evans 2019-04-07 18:49:55 -07:00
parent 03697ddf63
commit 15bca0d4d3
Notes: git 2019-08-31 04:40:16 +09:00

View File

@ -155,7 +155,7 @@ class TestSyntax < Test::Unit::TestCase
h = {k3: 31}
assert_raise(ArgumentError) {o.kw(**h)}
h = {"k1"=>11, k2: 12}
assert_raise(TypeError) {o.kw(**h)}
assert_raise(ArgumentError) {o.kw(**h)}
end
def test_keyword_duplicated