summaryrefslogtreecommitdiff
path: root/test/test_pp.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-01-22 18:12:34 -0800
committerJeremy Evans <code@jeremyevans.net>2020-01-23 09:30:29 -0800
commitf8a8f055123bc81fc13fa295b936504196df0da4 (patch)
treec6e9890c08b7370a3e89e3980004f254f10ad641 /test/test_pp.rb
parent6551a25a1951525f27c54c18207f95b6d253cbb9 (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/test_pp.rb')
-rw-r--r--test/test_pp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_pp.rb b/test/test_pp.rb
index cd16af6..3434c2b 100644
--- a/test/test_pp.rb
+++ b/test/test_pp.rb
@@ -178,7 +178,7 @@ class PPSingleLineTest < Test::Unit::TestCase
end
def test_hash_in_array
- assert_equal("[{}]", PP.singleline_pp([->(*a){a.last}.ruby2_keywords.call(**{})], ''.dup))
+ assert_equal("[{}]", PP.singleline_pp([->(*a){a.last.clear}.ruby2_keywords.call(a: 1)], ''.dup))
assert_equal("[{}]", PP.singleline_pp([Hash.ruby2_keywords_hash({})], ''.dup))
end
end