aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/os/mac.rb4
-rw-r--r--Library/Homebrew/os/mac/xcode.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 0af37578d..946c2576c 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -141,7 +141,7 @@ module OS
@gcc_42_build_version ||=
begin
gcc = MacOS.locate("gcc-4.2") || HOMEBREW_PREFIX.join("opt/apple-gcc42/bin/gcc-4.2")
- if gcc.exist? && gcc.realpath.basename.to_s !~ /^llvm/
+ if gcc.exist? && !gcc.realpath.basename.to_s.start_with?("llvm")
`#{gcc} --version`[/build (\d{4,})/, 1].to_i
end
end
@@ -150,7 +150,7 @@ module OS
def llvm_build_version
@llvm_build_version ||=
- if (path = locate("llvm-gcc")) && path.realpath.basename.to_s !~ /^clang/
+ if (path = locate("llvm-gcc")) && !path.realpath.basename.to_s.start_with?("clang")
`#{path} --version`[/LLVM build (\d{4,})/, 1].to_i
end
end
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 3de397dcc..86213e69b 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -141,9 +141,9 @@ module OS
def default_prefix?
if version < "4.3"
- %r{^/Developer} === prefix
+ prefix.to_s.start_with? "/Developer"
else
- %r{^/Applications/Xcode.app} === prefix
+ prefix.to_s.start_with? "/Applications/Xcode.app"
end
end
end