diff options
| author | Max Howell | 2009-08-30 15:49:38 +0100 |
|---|---|---|
| committer | Max Howell | 2009-08-30 15:49:38 +0100 |
| commit | dffcac8b410a4f67c83e03e940935179ae5db462 (patch) | |
| tree | c89f148cdd27e1444e32420677deff6eb14ae6be /Library | |
| parent | 253aa3e073bb2543a7d2405227c6dd2d41cca2f3 (diff) | |
| download | homebrew-dffcac8b410a4f67c83e03e940935179ae5db462.tar.bz2 | |
Ruby 1.9 version style
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/pathname+yeast.rb | 3 | ||||
| -rwxr-xr-x | Library/Homebrew/unittest.rb | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/pathname+yeast.rb b/Library/Homebrew/pathname+yeast.rb index 1c7b9794d..793f8d26f 100644 --- a/Library/Homebrew/pathname+yeast.rb +++ b/Library/Homebrew/pathname+yeast.rb @@ -104,7 +104,8 @@ class Pathname return $1.gsub('_', '.') if $1 # eg. foobar-4.5.1-1 - /-((\d+\.)*\d+-\d+)$/.match stem + # eg. ruby-1.9.1-p243 + /-((\d+\.)*\d\.\d+-p?\d+)$/.match stem return $1 if $1 # eg. foobar-4.5.1 diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb index c4d2a118d..f26b0a18d 100755 --- a/Library/Homebrew/unittest.rb +++ b/Library/Homebrew/unittest.rb @@ -318,4 +318,9 @@ class BeerTasting <Test::Unit::TestCase d.mkpath assert_equal '0.1.9', d.version end + + def test_ruby_version_style + f=MockFormula.new 'ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz' + assert_equal '1.9.1-p243', f.version + end end |
