Use slightly more suggestive method name for extracting slices

`extract_slice_from` is still a little ambiguous, so let's try to give
it a more suggestive name.
This commit is contained in:
Carlo Cabrera 2021-07-25 11:29:33 +08:00
parent a8527f4c16
commit 5128b92d3e
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -1594,12 +1594,12 @@ class Formula
end
end
targets.each { |t| extract_slice_from(Pathname.new(t), Hardware::CPU.arch) }
targets.each { |t| extract_macho_slice_from(Pathname.new(t), Hardware::CPU.arch) }
end
# @private
sig { params(file: Pathname, arch: T.nilable(Symbol)).void }
def extract_slice_from(file, arch = Hardware::CPU.arch)
def extract_macho_slice_from(file, arch = Hardware::CPU.arch)
odebug "Extracting #{arch} slice from #{file}"
file.ensure_writable do
macho = MachO::FatFile.new(file)