aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/version.rb')
-rw-r--r--Library/Homebrew/version.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index 9e2fd32ae..be1ee63c2 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -175,6 +175,10 @@ class Version
# e.g. astyle_1.23_macosx.tar.gz
m = /_([^_]+)/.match(stem)
return m.captures.first unless m.nil?
+
+ # e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war
+ m = /\/(\d\.\d+)\//.match(spec.to_s)
+ return m.captures.first unless m.nil?
end
# DSL for defining comparators