fix condition array substraction

This commit is contained in:
Max Eisner 2022-07-31 21:07:38 +02:00
parent 06518ec613
commit 8398dfbae0
No known key found for this signature in database
GPG Key ID: 4BF122C22879F0C8

View File

@ -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(", )", ")")