From eec7a96fbed77b5d9fcb0dda298745343e3b6522 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 20 Jan 2024 00:38:21 +0000 Subject: [PATCH] Use Ruby 3.1's `intersect\?` method --- Library/Homebrew/rubocops/cask/array_alphabetization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/rubocops/cask/array_alphabetization.rb b/Library/Homebrew/rubocops/cask/array_alphabetization.rb index 95ad1ee29a..97e5be079f 100644 --- a/Library/Homebrew/rubocops/cask/array_alphabetization.rb +++ b/Library/Homebrew/rubocops/cask/array_alphabetization.rb @@ -15,7 +15,7 @@ module RuboCop # For `zap`s, we only care about `trash` arrays. next if name == :zap && !symbols.include?(:trash) # Don't order `uninstall` arrays that contain commands. - next if name == :uninstall && (symbols & [:signal, :script, :early_script, :args, :input]).any? + next if name == :uninstall && symbols.intersect?([:signal, :script, :early_script, :args, :input]) pair.each_descendant(:array).each do |array| if array.children.length == 1