diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_keyword.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index a856a46569..5d0262a449 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -182,6 +182,13 @@ class TestKeywordArguments < Test::Unit::TestCase [:keyrest, :kw], [:block, :b]], method(:f9).parameters) end + def test_keyword_with_anonymous_keyword_splat + def self.a(b: 1, **) [b, **] end + kw = {b: 2, c: 3} + assert_equal([2, {c: 3}], a(**kw)) + assert_equal({b: 2, c: 3}, kw) + end + def test_keyword_splat_nil # cfunc call assert_equal(nil, p(**nil)) |
