diff --git a/Library/Homebrew/rubocops/cask/array_alphabetization.rb b/Library/Homebrew/rubocops/cask/array_alphabetization.rb index 39f7b618b9193..8e3e93b22ddc6 100644 --- a/Library/Homebrew/rubocops/cask/array_alphabetization.rb +++ b/Library/Homebrew/rubocops/cask/array_alphabetization.rb @@ -37,6 +37,7 @@ def on_send(node) def sort_array(source) # Combine each comment with the line(s) below so that they remain in the same relative location combined_source = source.each_with_index.filter_map do |line, index| + next if line.blank? next if line.strip.start_with?("#") next recursively_find_comments(source, index, line)