aboutsummaryrefslogtreecommitdiffstats
path: root/Cellar/homebrew/brewkit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Cellar/homebrew/brewkit.rb')
-rw-r--r--Cellar/homebrew/brewkit.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index 8965e3bf5..e05073b2e 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -44,8 +44,10 @@ class Formula
filename=File.basename url
i=filename.index /[-_]\d/
unless i.nil?
- /^((\d+[.-])*\d+)/.match filename[i+1,1000] #1000 because rubysucks
- @version = $1
+ /^((\d+[._])*(\d+-)?\d+)/.match filename[i+1,1000] #1000 because rubysucks
+ @version=$1
+ # if there are no dots replace underscores, boost do this, the bastards!
+ @version.gsub!('_', '.') unless @version.include? '.'
else
# no divisor or a '.' divisor, eg. dmd.1.11.zip
/^[a-zA-Z._-]*((\d+\.)*\d+)/.match filename