Skip to content

Commit c6561be

Browse files
committed
Fix up comment state
1 parent 8a50530 commit c6561be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/prism/parse_result.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def trailing_comment(comment)
153153
# Returns all comments that are associated with this location (both leading
154154
# and trailing comments).
155155
def comments
156-
(@leading_comments || []).concat(@trailing_comments || [])
156+
[*@leading_comments, *@trailing_comments]
157157
end
158158

159159
# Create a new location object with the given options.

0 commit comments

Comments
 (0)