update patchelf.rb to '~> 1.1' in Gemfile. Replace instance variable access with call to .elf.

patcher.elf was introduced in gem release v1.1.0.
This commit is contained in:
rmnull 2020-07-14 04:30:29 +05:30
parent 551d684bae
commit 2ca03610e2
No known key found for this signature in database
GPG Key ID: 35BAB82D31EFAD91
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ end
gem "activesupport" gem "activesupport"
gem "concurrent-ruby" gem "concurrent-ruby"
gem "mechanize" gem "mechanize"
gem "patchelf" if ENV["HOMEBREW_PATCHELF_RB"] gem "patchelf", "~> 1.1" if ENV["HOMEBREW_PATCHELF_RB"]
gem "plist" gem "plist"
gem "rubocop-performance" gem "rubocop-performance"
gem "rubocop-rspec" gem "rubocop-rspec"

View File

@ -93,7 +93,7 @@ module ELFShim
return @dynamic_elf if defined? @dynamic_elf return @dynamic_elf if defined? @dynamic_elf
@dynamic_elf = if HOMEBREW_PATCHELF_RB @dynamic_elf = if HOMEBREW_PATCHELF_RB
patchelf_patcher.instance_variable_get(:@elf).segment_by_type(:DYNAMIC).present? patchelf_patcher.elf.segment_by_type(:DYNAMIC).present?
elsif which "readelf" elsif which "readelf"
Utils.popen_read("readelf", "-l", to_path).include?(" DYNAMIC ") Utils.popen_read("readelf", "-l", to_path).include?(" DYNAMIC ")
elsif which "file" elsif which "file"