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