From f8a8f055123bc81fc13fa295b936504196df0da4 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Wed, 22 Jan 2020 18:12:34 -0800 Subject: 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. --- test/test_pp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_pp.rb') diff --git a/test/test_pp.rb b/test/test_pp.rb index cd16af6394..3434c2b04c 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 -- cgit v1.2.3