summaryrefslogtreecommitdiff
path: root/test/ruby/test_keyword.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-05 18:57:19 +0900
committerJeremy Evans <code@jeremyevans.net>2019-09-05 17:47:12 -0700
commit70f2780892330f8d1b612002c437fc2ca739fc7f (patch)
tree15bcae119a13b75f0022dfafd0ca57653e2f5242 /test/ruby/test_keyword.rb
parent252e2990099557a54577ad8915b689761117cd7a (diff)
vm_call_bmethod should not drop the empty keyword hash
Similar to 38e9c1bc35d5549575fbb263afff560e97db068e
Diffstat (limited to 'test/ruby/test_keyword.rb')
-rw-r--r--test/ruby/test_keyword.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb
index 3c486a4e15..dc450c08c2 100644
--- a/test/ruby/test_keyword.rb
+++ b/test/ruby/test_keyword.rb
@@ -733,7 +733,9 @@ class TestKeywordArguments < Test::Unit::TestCase
define_method(:m) {|arg, **opt| [arg, opt] }
end
assert_raise(ArgumentError) { c.m(**{}) }
- assert_raise(ArgumentError) { c.m(**kw) }
+ assert_warn(/The keyword argument is passed as the last hash parameter/m) do
+ assert_equal([kw, kw], c.m(**kw))
+ end
assert_warn(/The keyword argument is passed as the last hash parameter/m) do
assert_equal([h, kw], c.m(**h))
end