diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-02-19 12:54:57 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-02-19 19:50:46 +0000 |
| commit | ae3e82a5259893b4d68e2bedb675c160bcd1a173 (patch) | |
| tree | 2003f589848ace4dcfa29b2c7b28782104d5ee2e | |
| parent | 391b0bf07b5308cbe3def2b4cfb428ba7f17cf13 (diff) | |
[ruby/prism] Fix up comment state
https://github.com/ruby/prism/commit/c6561becf0
| -rw-r--r-- | lib/prism/parse_result.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prism/parse_result.rb b/lib/prism/parse_result.rb index 88f068e62a..7cb982e699 100644 --- a/lib/prism/parse_result.rb +++ b/lib/prism/parse_result.rb @@ -153,7 +153,7 @@ module Prism # 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. |
