Use grep instead of select + match

This commit is contained in:
Jack Nagel 2013-11-21 14:50:35 -06:00
parent f89c8bbaf9
commit 8c613e618b

View File

@ -204,7 +204,7 @@ class Cmd
end
def cpath
cpath = ENV['CMAKE_PREFIX_PATH'].split(':').map{|d| "#{d}/include" } + ENV['CMAKE_INCLUDE_PATH'].split(':')
opt = cpath.select{|prefix| prefix =~ %r{^#$brewfix/opt} }
opt = cpath.grep(%r{^#$brewfix/opt})
sys = cpath - opt
[sys, opt]
end