Skip to content

Commit

Permalink
[ruby/prism] Fix up comment state
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and matzbot committed Feb 19, 2024
1 parent 391b0bf commit ae3e82a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prism/parse_result.rb
Expand Up @@ -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.
Expand Down

0 comments on commit ae3e82a

Please sign in to comment.