diff --git a/Library/Homebrew/bundle/commands/cleanup.rb b/Library/Homebrew/bundle/commands/cleanup.rb index 9eb6847f44..2715fed00b 100644 --- a/Library/Homebrew/bundle/commands/cleanup.rb +++ b/Library/Homebrew/bundle/commands/cleanup.rb @@ -183,7 +183,7 @@ module Homebrew require "bundle/tap_dumper" @dsl ||= Brewfile.read(global:, file:) - kept_formulae = self.kept_formulae(global:, file:).filter_map(&method(:lookup_formula)) + kept_formulae = self.kept_formulae(global:, file:).filter_map { lookup_formula(_1) } kept_taps = @dsl.entries.select { |e| e.type == :tap }.map(&:name) kept_taps += kept_formulae.filter_map(&:tap).map(&:name) current_taps = Homebrew::Bundle::TapDumper.tap_names diff --git a/Library/Homebrew/cask_dependent.rb b/Library/Homebrew/cask_dependent.rb index 01bd0a7f19..815bc9050b 100644 --- a/Library/Homebrew/cask_dependent.rb +++ b/Library/Homebrew/cask_dependent.rb @@ -45,7 +45,7 @@ class CaskDependent ) end - sig { returns(T::Array[CaskDependent::Requirement]) } + sig { returns(T::Array[::Requirement]) } def requirements @requirements ||= T.let( begin @@ -73,7 +73,7 @@ class CaskDependent requirements end, - T.nilable(T::Array[CaskDependent::Requirement]), + T.nilable(T::Array[::Requirement]), ) end diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index b715f3c4d6..5b76df2bc2 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -430,7 +430,7 @@ RSpec.describe Homebrew::DevCmd::Bottle do old_spec = BottleSpecification.new old_spec.root_url("https://failbrew.bintray.com/bottles") new_hash = { "root_url" => "https://testbrew.bintray.com/bottles" } - expect(homebrew.merge_bottle_spec(["root_url"], old_spec, new_hash)).to eq [ + expect(homebrew.merge_bottle_spec([:root_url], old_spec, new_hash)).to eq [ ['root_url: old: "https://failbrew.bintray.com/bottles", new: "https://testbrew.bintray.com/bottles"'], [], ] diff --git a/Library/Homebrew/test/download_strategies/curl_spec.rb b/Library/Homebrew/test/download_strategies/curl_spec.rb index 623f6573a8..20d0e328bd 100644 --- a/Library/Homebrew/test/download_strategies/curl_spec.rb +++ b/Library/Homebrew/test/download_strategies/curl_spec.rb @@ -73,10 +73,7 @@ RSpec.describe CurlDownloadStrategy do expect(strategy).to receive(:system_command) .with( /curl/, - hash_including(args: array_including_cons( - "--user-agent", - a_string_matching(/Mozilla.*Mac OS X 10_15_7.*AppleWebKit/), - )), + hash_including(args: array_including_cons("--user-agent", "fake")), ) .at_least(:once) .and_return(instance_double(SystemCommand::Result, success?: true, stdout: "", assert_success!: nil)) @@ -173,7 +170,7 @@ RSpec.describe CurlDownloadStrategy do hash_including(args: array_including_cons("#{artifact_domain}/#{resource_path}")), ) .at_least(:once) - .and_return(SystemCommand::Result.new(["curl"], [""], status, secrets: [])) + .and_return(SystemCommand::Result.new(["curl"], [[:stdout, ""]], status, secrets: [])) strategy.fetch end