aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-21 10:35:05 -0500
committerJack Nagel2014-04-21 10:35:05 -0500
commitf1eb5128a47b910691b3591e001aacf67bc32b35 (patch)
tree3dfaa6b7382f124eae87257ed92b7abaa67291d6 /Library
parentcd066f70fd69b8c26907a6bd5a12b3d5f59c3458 (diff)
downloadhomebrew-f1eb5128a47b910691b3591e001aacf67bc32b35.tar.bz2
Only interpolate constant regexps once
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index c30569472..36dfcbbfc 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -171,7 +171,7 @@ class Cmd
def keep? path
case path
- when %r{^#{Regexp.escape(brewfix)}}, %r{^#{Regexp.escape(brewtmp)}}
+ when %r{^#{Regexp.escape(brewfix)}}o, %r{^#{Regexp.escape(brewtmp)}}o
# maybe homebrew is installed to /sw or /opt/brew
true
when %r{^/opt}, %r{^/sw}, %r{/usr/X11}
@@ -233,7 +233,7 @@ class Cmd
def cpath
cpath = path_split("CMAKE_PREFIX_PATH").map! { |d| File.join(d, "include") }
cpath += path_split("CMAKE_INCLUDE_PATH")
- opt = cpath.grep(%r{^#{Regexp.escape(brewfix)}/opt})
+ opt = cpath.grep(%r{^#{Regexp.escape(brewfix)}/opt}o)
sys = cpath - opt
[sys, opt]
end