diff --git a/Library/Homebrew/rubocops/cask/array_alphabetization.rb b/Library/Homebrew/rubocops/cask/array_alphabetization.rb index 49734bcc08..de52dddb9c 100644 --- a/Library/Homebrew/rubocops/cask/array_alphabetization.rb +++ b/Library/Homebrew/rubocops/cask/array_alphabetization.rb @@ -41,6 +41,7 @@ module RuboCop # Combine each comment with the line(s) below so that they remain in the same relative location combined_source = source.each_with_index.map do |line, index| next if line.strip.start_with?("#") + next recursively_find_comments(source, index, line) end.compact