From ae3e82a5259893b4d68e2bedb675c160bcd1a173 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 19 Feb 2024 12:54:57 -0500 Subject: [PATCH] [ruby/prism] Fix up comment state https://github.com/ruby/prism/commit/c6561becf0 --- lib/prism/parse_result.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prism/parse_result.rb b/lib/prism/parse_result.rb index 88f068e62acbe9..7cb982e69981f6 100644 --- a/lib/prism/parse_result.rb +++ b/lib/prism/parse_result.rb @@ -153,7 +153,7 @@ def trailing_comment(comment) # Returns all comments that are associated with this location (both leading # and trailing comments). def comments - (@leading_comments || []).concat(@trailing_comments || []) + [*@leading_comments, *@trailing_comments] end # Create a new location object with the given options.