diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index a514a073b7..5398a2feb6 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -165,7 +165,7 @@ module Cask odebug "Auditing stanzas which require an uninstall" return if cask.artifacts.none? { |k| k.is_a?(Artifact::Pkg) || k.is_a?(Artifact::Installer) } - return if cask.artifacts.any? { |k| k.is_a?(Artifact::Uninstall) } + return if cask.artifacts.any?(Artifact::Uninstall) add_error "installer and pkg stanzas require an uninstall stanza" end diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index b00e0aed3f..1ebd604576 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -474,7 +474,7 @@ module Homebrew "<#{type}>" end.compact - types << "" if @named_args_type.any? { |type| type.is_a? String } + types << "" if @named_args_type.any?(String) types.join("|") elsif SYMBOL_TO_USAGE_MAPPING.key? @named_args_type SYMBOL_TO_USAGE_MAPPING[@named_args_type] diff --git a/Library/Homebrew/dev-cmd/unbottled.rb b/Library/Homebrew/dev-cmd/unbottled.rb index 2c0f098f57..d25d46a06e 100644 --- a/Library/Homebrew/dev-cmd/unbottled.rb +++ b/Library/Homebrew/dev-cmd/unbottled.rb @@ -166,11 +166,11 @@ module Homebrew requirements = f.recursive_requirements if @bottle_tag.to_s.end_with?("_linux") - if requirements.any? { |r| r.is_a?(MacOSRequirement) } + if requirements.any?(MacOSRequirement) puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: requires macOS" if any_named_args next end - elsif requirements.any? { |r| r.is_a?(LinuxRequirement) } + elsif requirements.any?(LinuxRequirement) puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: requires Linux" if any_named_args next else diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 936eac09b0..ec5da965af 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1049,7 +1049,7 @@ class CVSDownloadStrategy < VCSDownloadStrategy end def split_url(in_url) - parts = in_url.split(/:/) + parts = in_url.split(":") mod = parts.pop url = parts.join(":") [mod, url]