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.