aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-08-09 17:37:57 -0500
committerJack Nagel2014-08-09 17:38:45 -0500
commita85f9c5dc5b0c95a897d0885395781900564f73a (patch)
tree7316607677412da807741ecb98c19e42fc6c9cb6 /Library
parent9d4434d74591d400aac787f14fc521d3679ba1ca (diff)
downloadhomebrew-a85f9c5dc5b0c95a897d0885395781900564f73a.tar.bz2
Cache options hash lookup on the stack
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 7a827b3d4..f94c1facc 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -72,11 +72,13 @@ class Keg
# lib/, and ignores binaries and other mach-o objects
# Note that this doesn't attempt to distinguish between libstdc++ versions,
# for instance between Apple libstdc++ and GNU libstdc++
- def detect_cxx_stdlibs(opts={:skip_executables => false})
+ def detect_cxx_stdlibs(options={})
+ options = { :skip_executables => false }.merge(options)
+ skip_executables = options[:skip_executables]
results = Set.new
mach_o_files.each do |file|
- next if file.mach_o_executable? && opts[:skip_executables]
+ next if file.mach_o_executable? && skip_executables
dylibs = file.dynamically_linked_libraries
results << :libcxx unless dylibs.grep(/libc\+\+.+\.dylib/).empty?
results << :libstdcxx unless dylibs.grep(/libstdc\+\+.+\.dylib/).empty?