diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index e6a4fdb19b..9e4809a992 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -23,7 +23,7 @@ end gem "activesupport" gem "concurrent-ruby" gem "mechanize" -gem "patchelf" if ENV["HOMEBREW_PATCHELF_RB"] +gem "patchelf", "~> 1.1" if ENV["HOMEBREW_PATCHELF_RB"] gem "plist" gem "rubocop-performance" gem "rubocop-rspec" diff --git a/Library/Homebrew/os/linux/elf.rb b/Library/Homebrew/os/linux/elf.rb index 51a1240207..2730d1da41 100644 --- a/Library/Homebrew/os/linux/elf.rb +++ b/Library/Homebrew/os/linux/elf.rb @@ -93,7 +93,7 @@ module ELFShim return @dynamic_elf if defined? @dynamic_elf @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" Utils.popen_read("readelf", "-l", to_path).include?(" DYNAMIC ") elsif which "file"