diff options
author | Jeremy Evans <[email protected]> | 2020-01-22 18:12:34 -0800 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2020-01-23 09:30:29 -0800 |
commit | f8a8f055123bc81fc13fa295b936504196df0da4 (patch) | |
tree | c6e9890c08b7370a3e89e3980004f254f10ad641 /test/ruby/test_keyword.rb | |
parent | 6551a25a1951525f27c54c18207f95b6d253cbb9 (diff) |
Remove empty keyword splats when calling even when using ruby2_keywords
Keeping empty keyword splats for ruby2_keywords methods was
necessary in 2.7 to prevent the final positional hash being
treated as keywords. Now that keyword argument separation
has been committed, the final positional hash is never
treated as keywords, so there is no need to keep empty
keyword splats when using ruby2_keywords.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2857
Diffstat (limited to 'test/ruby/test_keyword.rb')
-rw-r--r-- | test/ruby/test_keyword.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index 02745a1dfe..75991ca0b4 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -2339,10 +2339,10 @@ class TestKeywordArguments < Test::Unit::TestCase assert_equal([[1, h1, 1], {}], o.foo_bar_mod(1, **h1)) assert_equal([1, h1, 1], o.foo_baz_mod(1, **h1)) - assert_equal([[h1, {}, 1], {}], o.foo_mod(:bar, h1, **{})) - assert_equal([h1, {}, 1], o.foo_mod(:baz, h1, **{})) - assert_equal([[h1, {}, 1], {}], o.foo_bar_mod(h1, **{})) - assert_equal([h1, {}, 1], o.foo_baz_mod(h1, **{})) + assert_equal([[h1, 1], {}], o.foo_mod(:bar, h1, **{})) + assert_equal([h1, 1], o.foo_mod(:baz, h1, **{})) + assert_equal([[h1, 1], {}], o.foo_bar_mod(h1, **{})) + assert_equal([h1, 1], o.foo_baz_mod(h1, **{})) assert_equal([[1, h1, 1], {}], o.foo_mod(:bar, 1, h1)) assert_equal([1, h1, 1], o.foo_mod(:baz, 1, h1)) |