Merge pull request #10488 from Bo98/arch-deprecations
Deprecate additional arch functions
This commit is contained in:
commit
cf4763e02c
@ -80,6 +80,8 @@ module Hardware
|
||||
end
|
||||
|
||||
def universal_archs
|
||||
odeprecated "Hardware::CPU.universal_archs"
|
||||
|
||||
[arch].extend ArchitectureListExtension
|
||||
end
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
# typed: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
# TODO: (3.2) remove this module when the linked deprecated functions are removed.
|
||||
|
||||
require "hardware"
|
||||
|
||||
module ArchitectureListExtension
|
||||
|
@ -67,6 +67,7 @@ module MachOShim
|
||||
end
|
||||
|
||||
def archs
|
||||
# TODO: (3.2) remove ArchitectureListExtension
|
||||
mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension)
|
||||
end
|
||||
|
||||
|
@ -384,6 +384,8 @@ module Kernel
|
||||
|
||||
# Returns array of architectures that the given command or library is built for.
|
||||
def archs_for_command(cmd)
|
||||
odeprecated "archs_for_command"
|
||||
|
||||
cmd = which(cmd) unless Pathname.new(cmd).absolute?
|
||||
Pathname.new(cmd).archs
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user