The argument to MacOS.locate is always a string

This commit is contained in:
Jack Nagel 2014-04-21 22:39:44 -05:00
parent be66d746ad
commit dbb527f352

View File

@ -23,7 +23,7 @@ module OS
# Don't call tools (cc, make, strip, etc.) directly!
# Give the name of the binary you look for as a string to this method
# in order to get the full path back as a Pathname.
(@locate ||= {}).fetch(tool.to_s) do |key|
(@locate ||= {}).fetch(tool) do |key|
@locate[key] = if File.executable?(path = "/usr/bin/#{tool}")
Pathname.new path
# Homebrew GCCs most frequently; much faster to check this before xcrun