diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 63b1831a17..57343bc4bc 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -525,7 +525,7 @@ module RuboCop end offending_node(offenses.last) - replacement = if (shells - %w[:bash :zsh :fish]).empty? + replacement = if (%w[:bash :zsh :fish] - shells).empty? @offensive_node.source.sub(/shells: \[(:bash|:zsh|:fish)\]/, "") .gsub(",,", ",") .sub(", )", ")")