aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/version.rb
diff options
context:
space:
mode:
authorXu Cheng2016-07-13 16:19:51 +0800
committerXu Cheng2016-07-13 19:11:46 +0800
commitde1049f1f1237a31f8ac6a0b9b31ebdbc78030d4 (patch)
tree855fef004b1f4daa618bb922a446bf1e2e183352 /Library/Homebrew/version.rb
parent91fb49d270f0837e851b3e6e6b0f53848f024f6c (diff)
downloadbrew-de1049f1f1237a31f8ac6a0b9b31ebdbc78030d4.tar.bz2
various: proper escape dot in regex
Diffstat (limited to 'Library/Homebrew/version.rb')
-rw-r--r--Library/Homebrew/version.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index 81abbc324..02f442f5d 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -279,7 +279,7 @@ class Version
stem = if spec.directory?
spec.basename.to_s
- elsif %r{((?:sourceforge.net|sf.net)/.*)/download$}.match(spec_s)
+ elsif %r{((?:sourceforge\.net|sf\.net)/.*)/download$}.match(spec_s)
Pathname.new(spec.dirname).stem
else
spec.stem
@@ -290,7 +290,7 @@ class Version
# e.g. https://github.com/sam-github/libnet/tarball/libnet-1.1.4
# e.g. https://github.com/isaacs/npm/tarball/v0.2.5-1
# e.g. https://github.com/petdance/ack/tarball/1.93_02
- m = %r{github.com/.+/(?:zip|tar)ball/(?:v|\w+-)?((?:\d+[-._])+\d*)$}.match(spec_s)
+ m = %r{github\.com/.+/(?:zip|tar)ball/(?:v|\w+-)?((?:\d+[-._])+\d*)$}.match(spec_s)
return m.captures.first unless m.nil?
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)