Use grep instead of select + match
This commit is contained in:
parent
f89c8bbaf9
commit
8c613e618b
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user