Merge pull request #9461 from fxcoudert/revert

Revert "Fix `:arm64_big_sur` bottle ordering."
This commit is contained in:
FX Coudert 2020-12-08 16:16:37 +01:00 committed by GitHub
commit b2aad180fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View File

@ -11,14 +11,6 @@ module Hardware
INTEL_64BIT_ARCHS = [:x86_64].freeze
PPC_32BIT_ARCHS = [:ppc, :ppc32, :ppc7400, :ppc7450, :ppc970].freeze
PPC_64BIT_ARCHS = [:ppc64, :ppc64le, :ppc970].freeze
ARM_64BIT_ARCHS = [:arm64].freeze
ALL_ARCHS = [
*INTEL_32BIT_ARCHS,
*INTEL_64BIT_ARCHS,
*PPC_32BIT_ARCHS,
*PPC_64BIT_ARCHS,
*ARM_64BIT_ARCHS,
].freeze
class << self
extend T::Sig

View File

@ -25,11 +25,7 @@ module OS
sig { params(sym: Symbol).returns(T.attached_class) }
def self.from_symbol(sym)
@all_archs_regex ||= /^#{Regexp.union(Hardware::CPU::ALL_ARCHS.map(&:to_s))}_/
sym_without_arch = sym.to_s
.sub(@all_archs_regex, "")
.to_sym
str = SYMBOLS.fetch(sym_without_arch) { raise MacOSVersionError, sym }
str = SYMBOLS.fetch(sym) { raise MacOSVersionError, sym }
new(str)
end