diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 739f601c5b..b3f9fbe2b7 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -23,6 +23,8 @@ def built_bottle? f end def bottle_current? f + puts Pathname.new(f.bottle_url).version + puts f.version f.bottle_url && f.bottle_sha1 && Pathname.new(f.bottle_url).version == f.version end diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 82202ce5a4..454afb0747 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -214,10 +214,8 @@ class Pathname return $1 if $1 # eg. foobar4.5.1 - unless /^erlang-/.match basename - /((\d+\.)*\d+)$/.match stem - return $1 if $1 - end + /((\d+\.)*\d+)$/.match stem + return $1 if $1 # eg foobar-4.5.0-bin /-((\d+\.)+\d+[abc]?)[-._](bin|dist|stable|src|sources?)$/.match stem