From 6329db9065ae670f0f69454b3e58ec81ba7b3ea3 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:29:03 +0800 Subject: [PATCH] Remove macOS implementation of `#arch_compatible?` We don't really need this. --- Library/Homebrew/extend/pathname.rb | 2 +- Library/Homebrew/os/mac/mach.rb | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 1f7a787376..49f5d0111d 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -471,7 +471,7 @@ class Pathname sig { params(_wanted_arch: Symbol).returns(T::Boolean) } def arch_compatible?(_wanted_arch) - false + true end sig { returns(T::Array[String]) } diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index fdb4ffd387..a632b3d128 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -155,13 +155,6 @@ module MachOShim arch == :ppc64 end - def arch_compatible?(wanted_arch) - return true unless mach_data.present? - return arch == wanted_arch unless universal? - - archs.include?(wanted_arch) - end - def dylib? mach_data.any? { |m| m.fetch(:type) == :dylib } end