Prefer public_send to send
This commit is contained in:
parent
f9cc563e91
commit
5ecd24ba20
@ -204,8 +204,8 @@ class GitHubRunnerMatrix
|
|||||||
arch = runner.arch
|
arch = runner.arch
|
||||||
macos_version = runner.macos_version
|
macos_version = runner.macos_version
|
||||||
|
|
||||||
compatible_formulae.select! { |formula| formula.send(:"#{platform}_compatible?") }
|
compatible_formulae.select! { |formula| formula.public_send(:"#{platform}_compatible?") }
|
||||||
compatible_formulae.select! { |formula| formula.send(:"#{arch}_compatible?") }
|
compatible_formulae.select! { |formula| formula.public_send(:"#{arch}_compatible?") }
|
||||||
compatible_formulae.select! { |formula| formula.compatible_with?(macos_version) } if macos_version
|
compatible_formulae.select! { |formula| formula.compatible_with?(macos_version) } if macos_version
|
||||||
|
|
||||||
compatible_formulae.present?
|
compatible_formulae.present?
|
||||||
@ -221,15 +221,15 @@ class GitHubRunnerMatrix
|
|||||||
@testing_formulae.any? do |formula|
|
@testing_formulae.any? do |formula|
|
||||||
# If the formula has a platform/arch/macOS version requirement, then its
|
# If the formula has a platform/arch/macOS version requirement, then its
|
||||||
# dependents don't need to be tested if these requirements are not satisfied.
|
# dependents don't need to be tested if these requirements are not satisfied.
|
||||||
next false unless formula.send(:"#{platform}_compatible?")
|
next false unless formula.public_send(:"#{platform}_compatible?")
|
||||||
next false unless formula.send(:"#{arch}_compatible?")
|
next false unless formula.public_send(:"#{arch}_compatible?")
|
||||||
next false if macos_version.present? && !formula.compatible_with?(macos_version)
|
next false if macos_version.present? && !formula.compatible_with?(macos_version)
|
||||||
|
|
||||||
compatible_dependents = formula.dependents(platform: platform, arch: arch, macos_version: macos_version&.to_sym)
|
compatible_dependents = formula.dependents(platform: platform, arch: arch, macos_version: macos_version&.to_sym)
|
||||||
.dup
|
.dup
|
||||||
|
|
||||||
compatible_dependents.select! { |dependent_f| dependent_f.send(:"#{platform}_compatible?") }
|
compatible_dependents.select! { |dependent_f| dependent_f.public_send(:"#{platform}_compatible?") }
|
||||||
compatible_dependents.select! { |dependent_f| dependent_f.send(:"#{arch}_compatible?") }
|
compatible_dependents.select! { |dependent_f| dependent_f.public_send(:"#{arch}_compatible?") }
|
||||||
compatible_dependents.select! { |dependent_f| dependent_f.compatible_with?(macos_version) } if macos_version
|
compatible_dependents.select! { |dependent_f| dependent_f.compatible_with?(macos_version) } if macos_version
|
||||||
|
|
||||||
# These arrays will generally have been generated by different Formulary caches,
|
# These arrays will generally have been generated by different Formulary caches,
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class TestRunnerFormula
|
|||||||
Homebrew::SimulateSystem.arch = SIMULATE_SYSTEM_SYMBOLS.fetch(arch)
|
Homebrew::SimulateSystem.arch = SIMULATE_SYSTEM_SYMBOLS.fetch(arch)
|
||||||
Homebrew::SimulateSystem.os = macos_version || platform
|
Homebrew::SimulateSystem.os = macos_version || platform
|
||||||
|
|
||||||
Formula.send(formula_selector)
|
Formula.public_send(formula_selector)
|
||||||
.select { |candidate_f| candidate_f.deps.map(&:name).include?(name) }
|
.select { |candidate_f| candidate_f.deps.map(&:name).include?(name) }
|
||||||
.map { |f| TestRunnerFormula.new(f, eval_all: all) }
|
.map { |f| TestRunnerFormula.new(f, eval_all: all) }
|
||||||
.freeze
|
.freeze
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user