diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 697cd8654f..62cce8f3eb 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -116,7 +116,7 @@ GEM rubocop (~> 0.87) rubocop-sorbet (0.5.1) rubocop - ruby-macho (2.3.0) + ruby-macho (2.2.0) ruby-progressbar (1.10.1) simplecov (0.19.0) docile (~> 1.1) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index e22d19b124..89d30e2fef 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -20,7 +20,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/json-2.3.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.3.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.19.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/codecov-0.2.12/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/codecov-0.2.11/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/coderay-1.1.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/colorize-0.8.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/highline-2.0.3/lib" @@ -51,7 +51,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.19.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-3.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.7.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.5943/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-0.5.5942/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parlour-4.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/patchelf-1.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib" @@ -76,9 +76,9 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.92.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.8.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.43.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.3.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.5943-universal-darwin-19/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.5943/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.5942-universal-darwin-19/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.5942/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-stub-0.2.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-1.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/spoom-1.0.4/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho.rb similarity index 58% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho.rb index 506b6f263d..bb0336a499 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho.rb @@ -1,6 +1,3 @@ -# frozen_string_literal: true - -require "English" require_relative "macho/structure" require_relative "macho/view" require_relative "macho/headers" @@ -15,7 +12,7 @@ require_relative "macho/tools" # The primary namespace for ruby-macho. module MachO # release version - VERSION = "2.3.0" + VERSION = "2.2.0".freeze # Opens the given filename as a MachOFile or FatFile, depending on its magic. # @param filename [String] the file being opened @@ -28,7 +25,7 @@ module MachO raise ArgumentError, "#{filename}: no such file" unless File.file?(filename) raise TruncatedFileError unless File.stat(filename).size >= 4 - magic = File.open(filename, "rb") { |f| f.read(4) }.unpack1("N") + magic = File.open(filename, "rb") { |f| f.read(4) }.unpack("N").first if Utils.fat_magic?(magic) file = FatFile.new(filename) @@ -40,22 +37,4 @@ module MachO file end - - # Signs the dylib using an ad-hoc identity. - # Necessary after making any changes to a dylib, since otherwise - # changing a signed file invalidates its signature. - # @param filename [String] the file being opened - # @return [void] - # @raise [ModificationError] if the operation fails - def self.codesign!(filename) - # codesign binary is not available on Linux - return if RUBY_PLATFORM !~ /darwin/ - raise ArgumentError, "#{filename}: no such file" unless File.file?(filename) - - system("codesign", "--sign", "-", "--force", - "--preserve-metadata=entitlements,requirements,flags,runtime", - filename) - - raise ModificationError, "#{filename}: signing failed!" unless $CHILD_STATUS.success? - end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/exceptions.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/exceptions.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/exceptions.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/exceptions.rb index 4587c3086e..a07781cbbf 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/exceptions.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/exceptions.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # A generic Mach-O error in execution. class MachOError < RuntimeError @@ -43,8 +41,8 @@ module MachO # Raised when a file's magic bytes are not valid Mach-O magic. class MagicError < NotAMachOError # @param num [Integer] the unknown number - def initialize(magic) - super "Unrecognized Mach-O magic: 0x%02x" % { :magic => magic } + def initialize(num) + super "Unrecognized Mach-O magic: 0x#{"%02x" % num}" end end @@ -73,7 +71,7 @@ module MachO class CPUTypeError < MachOError # @param cputype [Integer] the unknown CPU type def initialize(cputype) - super "Unrecognized CPU type: 0x%08x" % { :cputype => cputype } + super "Unrecognized CPU type: 0x#{"%08x" % cputype}" end end @@ -82,8 +80,8 @@ module MachO # @param cputype [Integer] the CPU type of the unknown pair # @param cpusubtype [Integer] the CPU sub-type of the unknown pair def initialize(cputype, cpusubtype) - super "Unrecognized CPU sub-type: 0x%08x" \ - " (for CPU type: 0x%08x" % { :cputype => cputype, :cpusubtype => cpusubtype } + super "Unrecognized CPU sub-type: 0x#{"%08x" % cpusubtype}" \ + " (for CPU type: 0x#{"%08x" % cputype})" end end @@ -91,7 +89,7 @@ module MachO class FiletypeError < MachOError # @param num [Integer] the unknown number def initialize(num) - super "Unrecognized Mach-O filetype code: 0x%02x" % { :num => num } + super "Unrecognized Mach-O filetype code: 0x#{"%02x" % num}" end end @@ -99,7 +97,7 @@ module MachO class LoadCommandError < MachOError # @param num [Integer] the unknown number def initialize(num) - super "Unrecognized Mach-O load command: 0x%02x" % { :num => num } + super "Unrecognized Mach-O load command: 0x#{"%02x" % num}" end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/fat_file.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/fat_file.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/fat_file.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/fat_file.rb index 93ac2a000c..809f647ca1 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/fat_file.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/fat_file.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "forwardable" module MachO @@ -400,13 +398,13 @@ module MachO machos.each_with_index do |macho, index| begin yield macho - rescue RecoverableModificationError => e - e.macho_slice = index + rescue RecoverableModificationError => error + error.macho_slice = index # Strict mode: Immediately re-raise. Otherwise: Retain, check later. - raise e if strict + raise error if strict - errors << e + errors << error end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/headers.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/headers.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/headers.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/headers.rb index 525809e6bb..0a940e405c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/headers.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/headers.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # Classes and constants for parsing the headers of Mach-O binaries. module Headers @@ -492,7 +490,7 @@ module MachO # always big-endian # @see MachOStructure::FORMAT # @api private - FORMAT = "N2" + FORMAT = "N2".freeze # @see MachOStructure::SIZEOF # @api private @@ -543,7 +541,7 @@ module MachO # @note Always big endian. # @see MachOStructure::FORMAT # @api private - FORMAT = "L>5" + FORMAT = "L>5".freeze # @see MachOStructure::SIZEOF # @api private @@ -589,7 +587,7 @@ module MachO # @note Always big endian. # @see MachOStructure::FORMAT # @api private - FORMAT = "L>2Q>2L>2" + FORMAT = "L>2Q>2L>2".freeze # @see MachOStructure::SIZEOF # @api private @@ -639,7 +637,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=7" + FORMAT = "L=7".freeze # @see MachOStructure::SIZEOF # @api private @@ -762,7 +760,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=8" + FORMAT = "L=8".freeze # @see MachOStructure::SIZEOF # @api private diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/load_commands.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/load_commands.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/load_commands.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/load_commands.rb index 0220743cfc..394a0c6717 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/load_commands.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/load_commands.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # Classes and constants for parsing load commands in Mach-O binaries. module LoadCommands @@ -62,8 +60,6 @@ module MachO 0x30 => :LC_VERSION_MIN_WATCHOS, 0x31 => :LC_NOTE, 0x32 => :LC_BUILD_VERSION, - (0x33 | LC_REQ_DYLD) => :LC_DYLD_EXPORTS_TRIE, - (0x34 | LC_REQ_DYLD) => :LD_DYLD_CHAINED_FIXUPS, }.freeze # association of symbol representations to load command constants @@ -149,8 +145,6 @@ module MachO :LC_VERSION_MIN_WATCHOS => "VersionMinCommand", :LC_NOTE => "NoteCommand", :LC_BUILD_VERSION => "BuildVersionCommand", - :LC_DYLD_EXPORTS_TRIE => "LinkeditDataCommand", - :LD_DYLD_CHAINED_FIXUPS => "LinkeditDataCommand", }.freeze # association of segment name symbols to names @@ -192,7 +186,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2" + FORMAT = "L=2".freeze # @see MachOStructure::SIZEOF # @api private @@ -371,7 +365,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2a16" + FORMAT = "L=2a16".freeze # @see MachOStructure::SIZEOF # @api private @@ -385,7 +379,7 @@ module MachO # @return [String] a string representation of the UUID def uuid_string - hexes = uuid.map { |elem| "%02x" % { :elem => elem } } + hexes = uuid.map { |e| "%02x" % e } segs = [ hexes[0..3].join, hexes[4..5].join, hexes[6..7].join, hexes[8..9].join, hexes[10..15].join @@ -435,7 +429,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2Z16L=4l=2L=2" + FORMAT = "L=2Z16L=4l=2L=2".freeze # @see MachOStructure::SIZEOF # @api private @@ -530,7 +524,7 @@ module MachO class SegmentCommand64 < SegmentCommand # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2Z16Q=4l=2L=2" + FORMAT = "L=2Z16Q=4l=2L=2".freeze # @see MachOStructure::SIZEOF # @api private @@ -556,7 +550,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=6" + FORMAT = "L=6".freeze # @see MachOStructure::SIZEOF # @api private @@ -607,7 +601,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -655,7 +649,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=5" + FORMAT = "L=5".freeze # @see MachOStructure::SIZEOF # @api private @@ -685,7 +679,7 @@ module MachO class ThreadCommand < LoadCommand # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2" + FORMAT = "L=2".freeze # @see MachOStructure::SIZEOF # @api private @@ -723,7 +717,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=10" + FORMAT = "L=10".freeze # @see MachOStructure::SIZEOF # @api private @@ -764,7 +758,7 @@ module MachO class RoutinesCommand64 < RoutinesCommand # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2Q=8" + FORMAT = "L=2Q=8".freeze # @see MachOStructure::SIZEOF # @api private @@ -779,7 +773,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -807,7 +801,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -835,7 +829,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -863,7 +857,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -900,7 +894,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=6" + FORMAT = "L=6".freeze # @see MachOStructure::SIZEOF # @api private @@ -985,7 +979,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=20" + FORMAT = "L=20".freeze # @see MachOStructure::SIZEOF # @api private @@ -1058,7 +1052,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=4" + FORMAT = "L=4".freeze # @see MachOStructure::SIZEOF # @api private @@ -1133,7 +1127,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -1162,7 +1156,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -1197,8 +1191,7 @@ module MachO # A load command representing the offsets and sizes of a blob of data in # the __LINKEDIT segment. Corresponds to LC_CODE_SIGNATURE, # LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, - # LC_DYLIB_CODE_SIGN_DRS, LC_LINKER_OPTIMIZATION_HINT, LC_DYLD_EXPORTS_TRIE, - # or LC_DYLD_CHAINED_FIXUPS. + # LC_DYLIB_CODE_SIGN_DRS, and LC_LINKER_OPTIMIZATION_HINT. class LinkeditDataCommand < LoadCommand # @return [Integer] offset to the data in the __LINKEDIT segment attr_reader :dataoff @@ -1208,7 +1201,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=4" + FORMAT = "L=4".freeze # @see MachOStructure::SIZEOF # @api private @@ -1244,7 +1237,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=5" + FORMAT = "L=5".freeze # @see MachOStructure::SIZEOF # @api private @@ -1276,7 +1269,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=6" + FORMAT = "L=6".freeze # @see MachOStructure::SIZEOF # @api private @@ -1308,7 +1301,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=4" + FORMAT = "L=4".freeze # @see MachOStructure::SIZEOF # @api private @@ -1324,7 +1317,7 @@ module MachO # A string representation of the binary's minimum OS version. # @return [String] a string representing the minimum OS version. def version_string - binary = "%032b" % { :version => version } + binary = "%032b" % version segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } @@ -1335,7 +1328,7 @@ module MachO # A string representation of the binary's SDK version. # @return [String] a string representing the SDK version. def sdk_string - binary = "%032b" % { :sdk => sdk } + binary = "%032b" % sdk segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } @@ -1372,7 +1365,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=6" + FORMAT = "L=6".freeze # @see MachOStructure::SIZEOF # @api private @@ -1390,7 +1383,7 @@ module MachO # A string representation of the binary's minimum OS version. # @return [String] a string representing the minimum OS version. def minos_string - binary = "%032b" % { :minos => minos } + binary = "%032b" % minos segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } @@ -1401,7 +1394,7 @@ module MachO # A string representation of the binary's SDK version. # @return [String] a string representing the SDK version. def sdk_string - binary = "%032b" % { :sdk => sdk } + binary = "%032b" % sdk segs = [ binary[0..15], binary[16..23], binary[24..31] ].map { |s| s.to_i(2) } @@ -1501,7 +1494,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=12" + FORMAT = "L=12".freeze # @see MachOStructure::SIZEOF # @api private @@ -1549,7 +1542,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=3" + FORMAT = "L=3".freeze # @see MachOStructure::SIZEOF # @api private @@ -1579,7 +1572,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2Q=2" + FORMAT = "L=2Q=2".freeze # @see MachOStructure::SIZEOF # @api private @@ -1609,7 +1602,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2Q=1" + FORMAT = "L=2Q=1".freeze # @see MachOStructure::SIZEOF # @api private @@ -1624,7 +1617,7 @@ module MachO # A string representation of the sources used to build the binary. # @return [String] a string representation of the version def version_string - binary = "%064b" % { :version => version } + binary = "%064b" % version segs = [ binary[0..23], binary[24..33], binary[34..43], binary[44..53], binary[54..63] @@ -1653,7 +1646,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=4" + FORMAT = "L=4".freeze # @see MachOStructure::SIZEOF # @api private @@ -1681,7 +1674,7 @@ module MachO class IdentCommand < LoadCommand # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2" + FORMAT = "L=2".freeze # @see MachOStructure::SIZEOF # @api private @@ -1699,7 +1692,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=4" + FORMAT = "L=4".freeze # @see MachOStructure::SIZEOF # @api private @@ -1734,7 +1727,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=5" + FORMAT = "L=5".freeze # @see MachOStructure::SIZEOF # @api private @@ -1771,7 +1764,7 @@ module MachO # @see MachOStructure::FORMAT # @api private - FORMAT = "L=2Z16Q=2" + FORMAT = "L=2Z16Q=2".freeze # @see MachOStructure::SIZEOF # @api private diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/macho_file.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/macho_file.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/macho_file.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/macho_file.rb index 041111ad3b..dc5bb3b914 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/macho_file.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/macho_file.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "forwardable" module MachO @@ -478,7 +476,7 @@ module MachO # @raise [FatBinaryError] if the magic is for a Fat file # @api private def populate_and_check_magic - magic = @raw_data[0..3].unpack1("N") + magic = @raw_data[0..3].unpack("N").first raise MagicError, magic unless Utils.magic?(magic) raise FatBinaryError if Utils.fat_magic?(magic) @@ -524,7 +522,7 @@ module MachO header.ncmds.times do fmt = Utils.specialize_format("L=", endianness) - cmd = @raw_data.slice(offset, 4).unpack1(fmt) + cmd = @raw_data.slice(offset, 4).unpack(fmt).first cmd_sym = LoadCommands::LOAD_COMMANDS[cmd] raise LoadCommandError, cmd unless cmd_sym || permissive diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/sections.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/sections.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/sections.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/sections.rb index f2d0b3db95..093fbb2f88 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/sections.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/sections.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # Classes and constants for parsing sections in Mach-O binaries. module Sections @@ -110,7 +108,7 @@ module MachO attr_reader :reserved2 # @see MachOStructure::FORMAT - FORMAT = "Z16Z16L=9" + FORMAT = "Z16Z16L=9".freeze # @see MachOStructure::SIZEOF SIZEOF = 68 @@ -182,7 +180,7 @@ module MachO attr_reader :reserved3 # @see MachOStructure::FORMAT - FORMAT = "Z16Z16Q=2L=8" + FORMAT = "Z16Z16Q=2L=8".freeze # @see MachOStructure::SIZEOF SIZEOF = 80 diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/structure.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/structure.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/structure.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/structure.rb index 0356d605af..7bece4d704 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/structure.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/structure.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # A general purpose pseudo-structure. # @abstract @@ -7,7 +5,7 @@ module MachO # The String#unpack format of the data structure. # @return [String] the unpacking format # @api private - FORMAT = "" + FORMAT = "".freeze # The size of the data structure, in bytes. # @return [Integer] the size, in bytes diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/tools.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/tools.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/tools.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/tools.rb index 00c80ef1ca..c9bcbd7407 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/tools.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/tools.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # A collection of convenient methods for common operations on Mach-O and Fat # binaries. @@ -25,8 +23,6 @@ module MachO file.change_dylib_id(new_id, options) file.write! - - MachO.codesign!(filename) end # Changes a shared library install name in a Mach-O or Fat binary, @@ -43,8 +39,6 @@ module MachO file.change_install_name(old_name, new_name, options) file.write! - - MachO.codesign!(filename) end # Changes a runtime path in a Mach-O or Fat binary, overwriting the source @@ -61,8 +55,6 @@ module MachO file.change_rpath(old_path, new_path, options) file.write! - - MachO.codesign!(filename) end # Add a runtime path to a Mach-O or Fat binary, overwriting the source file. @@ -77,8 +69,6 @@ module MachO file.add_rpath(new_path, options) file.write! - - MachO.codesign!(filename) end # Delete a runtime path from a Mach-O or Fat binary, overwriting the source @@ -94,8 +84,6 @@ module MachO file.delete_rpath(old_path, options) file.write! - - MachO.codesign!(filename) end # Merge multiple Mach-Os into one universal (Fat) binary. @@ -116,8 +104,6 @@ module MachO fat_macho = MachO::FatFile.new_from_machos(*machos, :fat64 => fat64) fat_macho.write(filename) - - MachO.codesign!(filename) end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/utils.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/utils.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/utils.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/utils.rb index 362e4dbf03..fb41806041 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/utils.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/utils.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # A collection of utility functions used throughout ruby-macho. module Utils @@ -53,7 +51,7 @@ module MachO def self.pack_strings(fixed_offset, alignment, strings = {}) offsets = {} next_offset = fixed_offset - payload = +"" + payload = "" strings.each do |key, string| offsets[key] = next_offset @@ -63,7 +61,7 @@ module MachO end payload << Utils.nullpad(padding_for(fixed_offset + payload.bytesize, alignment)) - [payload.freeze, offsets] + [payload, offsets] end # Compares the given number to valid Mach-O magic numbers. diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/view.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/view.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/view.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/view.rb index ad68ee30ed..5bd40e7f0e 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.3.0/lib/macho/view.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/ruby-macho-2.2.0/lib/macho/view.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module MachO # A representation of some unspecified Mach-O data. class MachOView