aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/update.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 11:24:24 -0500
committerJack Nagel2014-07-06 11:25:56 -0500
commit17c4b3dd20614e96e3cb6c4c64c173d2eacd61cd (patch)
tree81c523337b9cbc4e868f5e111fc2e91ae4c119b6 /Library/Homebrew/cmd/update.rb
parentce0d1fee967532e499402b2a32584ac14c1e1fb5 (diff)
downloadhomebrew-17c4b3dd20614e96e3cb6c4c64c173d2eacd61cd.tar.bz2
Escape paths in regexps
Diffstat (limited to 'Library/Homebrew/cmd/update.rb')
-rw-r--r--Library/Homebrew/cmd/update.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index 7bced13a9..b1ee8d8fe 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -266,7 +266,7 @@ class Report
def select_formula key
fetch(key, []).map do |path|
case path.to_s
- when Regexp.new(HOMEBREW_LIBRARY + "/Formula")
+ when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula}o
path.basename(".rb").to_s
when HOMEBREW_TAP_PATH_REGEX
"#$1/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"