summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-04-07 18:49:55 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commit15bca0d4d373820fa648c351dc13c2131849d9b3 (patch)
tree2746ce80792248a8bb3407fb01a4ac53b07ff0cb /test/ruby/test_syntax.rb
parent03697ddf63eb9acd41e4f2185a019d39d1ead3cf (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 9b9063c768..02a95bc60b 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -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