aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-04-21 10:35:05 -0500
committerJack Nagel2014-04-21 10:35:05 -0500
commit9d15aefd2e54da520e1b4adc4650094084ddb7b4 (patch)
tree7d31ae33dfcde0c0ffc2494559ddb4130701a4ff
parenteed336803944f27c47eaa8eaf5ecfcf6d8efef16 (diff)
downloadbrew-9d15aefd2e54da520e1b4adc4650094084ddb7b4.tar.bz2
Only interpolate constant regexps once
-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