diff --git a/Library/Homebrew/unversioned_cask_checker.rb b/Library/Homebrew/unversioned_cask_checker.rb index ba7bc849c7..329bd3c0de 100644 --- a/Library/Homebrew/unversioned_cask_checker.rb +++ b/Library/Homebrew/unversioned_cask_checker.rb @@ -126,7 +126,7 @@ module Homebrew # Installers are sometimes contained within an `.app`, so try both. installer_path = artifact.path installer_path.ascend - .flat_map { |path| (path == installer_path || path.extname == ".app") ? [path] : [] } + .select { |path| path == installer_path || path.extname == ".app" } .sort else [artifact.source.basename]