From 8398dfbae0cdab443071b98dea07f3788dc3229c Mon Sep 17 00:00:00 2001 From: Max Eisner <4730112+max-ae@users.noreply.github.com> Date: Sun, 31 Jul 2022 21:07:38 +0200 Subject: [PATCH] fix condition array substraction --- Library/Homebrew/rubocops/lines.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(", )", ")")