diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-14 09:04:57 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-14 09:04:57 +0000 |
commit | 3db2041f8772ec7c9faf379095d4c8d06e5e25ed (patch) | |
tree | 35adbc814efa5fc9a7ee34bfef6bbbc32c46e4ae /test/ruby | |
parent | 146bb252a0fe114befe8aa762596563c886db7fc (diff) | |
download | ruby-3db2041f8772ec7c9faf379095d4c8d06e5e25ed.tar.gz |
compile.c: fix the corner case of rest and keyword arguments
See https://bugs.ruby-lang.org/issues/10856#note-20 . [Bug #10856]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_keyword.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index 84a5cfec66..eda74276e2 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -518,6 +518,8 @@ class TestKeywordArguments < Test::Unit::TestCase assert_equal(:ok, m.f(**o), '[ruby-core:68124] [Bug #10856]') a = [] assert_equal(:ok, m.f(*a, **o), '[ruby-core:83638] [Bug #10856]') + assert_equal(:OK, m.f1(*a, :OK, **o), '[ruby-core:91825] [Bug #10856]') + assert_equal({}, m.f1(*a, o), '[ruby-core:91825] [Bug #10856]') o = {a: 42} assert_warning(/splat keyword/, 'splat to mandatory') do |