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:
parent
03697ddf63
commit
15bca0d4d3
Notes:
git
2019-08-31 04:40:16 +09:00
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user