aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorlukas2010-08-27 08:42:50 +0200
committerDavid Höppner2010-08-27 17:53:06 +0200
commitbd6fb103614d2b7e4f49bf6c6bdfb5e8e769c2c1 (patch)
tree913cb018410797a09783bcb2a596d70ddfafcb20 /Library/Homebrew/extend
parent4f56674c7201cf9da33c34a98bf16efb45491832 (diff)
downloadbrew-bd6fb103614d2b7e4f49bf6c6bdfb5e8e769c2c1.tar.bz2
Fixed recognition of versions like 'foobar-4.50-beta' in Pathname#version
Sphinx currently has a download name 'http://sphinxsearch.com/downloads/sphinx-1.10-beta.tar.gz', which homebrew currently can't correctly identify - with a small change to the regex for 'foobar-4.5.0-beta1' (make that trailing number optional) - it works like a charm. Signed-off-by: David Höppner <0xffea@gmail.com>
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/pathname.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 8a940af0a..0a4264c7e 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -134,8 +134,8 @@ class Pathname
/-((\d+\.)*\d+([abc]|rc|RC)\d*)$/.match stem
return $1 if $1
- # eg foobar-4.5.0-beta1
- /-((\d+\.)*\d+-beta\d+)$/.match stem
+ # eg foobar-4.5.0-beta1, or foobar-4.50-beta
+ /-((\d+\.)*\d+-beta(\d+)?)$/.match stem
return $1 if $1
# eg. foobar4.5.1