aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/extend/pathname.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 8d81861ec..0982a6f33 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -113,6 +113,10 @@ class Pathname
%r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
return $1 if $1
+ # eg. github.com/isaacs/npm/tarball/v0.2.5-1
+ %r[github.com/.*/tarball/v?((\d\.)+\d+-(\d+))$].match to_s
+ return $1 if $1
+
# eg. boost_1_39_0
/((\d+_)+\d+)$/.match stem
return $1.gsub('_', '.') if $1