dev-cmd/unbottled: more idiomatic Ruby.

This commit is contained in:
Mike McQuaid 2023-10-18 08:52:25 +01:00 committed by GitHub
parent 651cef6f6b
commit f656f8db97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,8 @@ module Homebrew
end
# Remove deprecated formulae as we do not care if they are unbottled
formulae = formulae&.select {|formula| !(formula.deprecated?)}
all_formulae = all_formulae&.select {|formula| !(formula.deprecated?)}
formulae = Array(formulae).reject(&:deprecated?) if formulae.present?
all_formulae = Array(all_formulae).reject(&:deprecated?) if all_formulae.present?
[formulae, all_formulae, formula_installs]
end