aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb2
-rw-r--r--Library/Homebrew/test/test_versions.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index e2489a51b..d4fa6d92e 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -110,7 +110,7 @@ class Pathname
# github tarballs are special
# we only support numbered tagged downloads
- %r[github.com/.*/tarball/v?((\d\.)+\d)$].match to_s
+ %r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
return $1 if $1
# eg. boost_1_39_0
diff --git a/Library/Homebrew/test/test_versions.rb b/Library/Homebrew/test/test_versions.rb
index 446b2c8ef..3e55676f5 100644
--- a/Library/Homebrew/test/test_versions.rb
+++ b/Library/Homebrew/test/test_versions.rb
@@ -74,6 +74,11 @@ class VersionTests < Test::Unit::TestCase
assert_equal '1.0.5', r.version
end
+ def test_version_github_with_high_patch_number
+ r=MockFormula.new "http://github.com/lloyd/yajl/tarball/v1.2.34"
+ assert_equal '1.2.34', r.version
+ end
+
def test_yet_another_version
r=MockFormula.new "http://example.com/mad-0.15.1b.tar.gz"
assert_equal '0.15.1b', r.version