aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-10-28 22:49:40 -0500
committerJack Nagel2014-10-28 22:49:40 -0500
commitd494c9db8e24740d87c0717ed35ca8731f7e209b (patch)
treed82eac62fc16392e16a53d7165f0e811b6a4657b
parentd7de5b6e240ff6c49e874a857ba8d439dc0e2eb7 (diff)
downloadbrew-d494c9db8e24740d87c0717ed35ca8731f7e209b.tar.bz2
Use start_with? instead of regexp
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 411c20a34..59212602d 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -661,7 +661,7 @@ def check_for_config_scripts
paths.each do |p|
next if whitelist.include? p.downcase
- next if p =~ %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})]
+ next if p.start_with?(real_cellar.to_s, HOMEBREW_CELLAR.to_s)
configs = Dir["#{p}/*-config"]
config_scripts << [p, configs.map { |c| File.basename(c) }] unless configs.empty?