diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-09-05 18:54:26 +0900 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-05 17:47:12 -0700 |
commit | 252e2990099557a54577ad8915b689761117cd7a (patch) | |
tree | b6b8769fe8f038e4da29b24da760c842444536bb /test/ruby/test_keyword.rb | |
parent | 4615886c76c0e906a349440ac7e232ad0ba5ce30 (diff) |
vm_call_opt_send should not drop the empty keyword hash
Now the mechanism that conveys kw_splat flag is gradually established,
so the hack to drop the empty keyword hash is not needed for
vm_call_opt_send.
Diffstat (limited to 'test/ruby/test_keyword.rb')
-rw-r--r-- | test/ruby/test_keyword.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index 974a14fbcf..3c486a4e15 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -465,7 +465,9 @@ class TestKeywordArguments < Test::Unit::TestCase [arg, args] end assert_raise(ArgumentError) { c.send(:m, **{}) } - assert_raise(ArgumentError) { c.send(:m, **kw) } + assert_warn(/The keyword argument is passed as the last hash parameter.* for `m'/m) do + assert_equal([kw, kw], c.send(:m, **kw)) + end assert_warn(/The keyword argument is passed as the last hash parameter.* for `m'/m) do assert_equal([h, kw], c.send(:m, **h)) end @@ -640,7 +642,6 @@ class TestKeywordArguments < Test::Unit::TestCase [arg, args] end assert_raise(ArgumentError) { c.m(**{}) } - assert_raise(ArgumentError) { c.send(:m, **kw) } # XXX: fix it after the commit assert_warn(/The keyword argument is passed as the last hash parameter.* for `method_missing'/m) do assert_equal([kw, kw], c.m(**kw)) end |