diff --git a/Library/Homebrew/extend/os/linux/dev-cmd/determine-test-runners.rb b/Library/Homebrew/extend/os/linux/dev-cmd/determine-test-runners.rb index e4980ce09e..fc0b4315c5 100755 --- a/Library/Homebrew/extend/os/linux/dev-cmd/determine-test-runners.rb +++ b/Library/Homebrew/extend/os/linux/dev-cmd/determine-test-runners.rb @@ -81,16 +81,16 @@ module Homebrew testing_formulae.any? do |formula| # 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. - next false if reject_platform && formula.method(:"#{reject_platform}_only?").call - next false if reject_arch && formula.method(:"#{reject_arch}_only?").call + next false if reject_platform && formula.send(:"#{reject_platform}_only?") + next false if reject_arch && formula.send(:"#{reject_arch}_only?") next false if select_macos_version && !formula.compatible_with?(select_macos_version) compatible_dependents = formula.dependents.dup - compatible_dependents.reject! { |dependent_f| dependent_f.method(:"#{reject_arch}_only?").call } if reject_arch + compatible_dependents.reject! { |dependent_f| dependent_f.send(:"#{reject_arch}_only?")} if reject_arch if reject_platform - compatible_dependents.reject! { |dependent_f| dependent_f.method(:"#{reject_platform}_only?").call } + compatible_dependents.reject! { |dependent_f| dependent_f.send(:"#{reject_platform}_only?") } end if select_macos_version @@ -129,9 +129,9 @@ module Homebrew compatible_formulae = formulae.dup - compatible_formulae.reject! { |formula| formula.method(:"#{reject_arch}_only?").call } if reject_arch + compatible_formulae.reject! { |formula| formula.send(:"#{reject_platform}_only?") } if reject_platform + compatible_formulae.reject! { |formula| formula.send(:"#{reject_arch}_only?") } if reject_arch compatible_formulae.select! { |formula| formula.compatible_with?(select_macos_version) } if select_macos_version - compatible_formulae.reject! { |formula| formula.method(:"#{reject_platform}_only?").call } if reject_platform compatible_formulae.present? end diff --git a/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb b/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb index 27576dd959..1cea8aee8f 100644 --- a/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb +++ b/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb @@ -16,7 +16,7 @@ describe "brew determine-test-runners" do let(:arm64_runners) { all_runners - intel_runners } let(:macos_runners) { all_runners - [linux_runner] } # We need to make sure we write to a different path for each example. - let(:github_output) { "#{TEST_TMPDIR}/github_output#{TestRunnerTestHelper.new.number}" } + let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" } let(:ephemeral_suffix) { "-12345-1" } let(:runner_env) do { @@ -158,7 +158,7 @@ def get_runners(file) .sort end -class TestRunnerTestHelper +class DetermineRunnerTestHelper @instances = 0 class << self