aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/version.rb
diff options
context:
space:
mode:
authorXiyue Deng2016-01-01 02:29:41 -0800
committerBaptiste Fontaine2016-01-02 20:06:17 +0100
commite1dfafa54ccf95d6abe5de28da53ea1e6406f567 (patch)
tree928eb1b0b437464391d52719011c7f598679f2db /Library/Homebrew/version.rb
parentc6f45a9e06534787d1b5256e005b35cb9e75d0cd (diff)
downloadbrew-e1dfafa54ccf95d6abe5de28da53ea1e6406f567.tar.bz2
Improve dash separated version detection.
* Also with test case. Closes Homebrew/homebrew#47584. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library/Homebrew/version.rb')
-rw-r--r--Library/Homebrew/version.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index 70e7198b0..6345676c3 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -312,7 +312,7 @@ class Version
return m.captures.first unless m.nil?
# e.g. lame-398-1
- m = /-((?:\d)+-\d)/.match(stem)
+ m = /-((?:\d)+-\d+)/.match(stem)
return m.captures.first unless m.nil?
# e.g. foobar-4.5.1