diff options
| author | Jack Nagel | 2013-06-06 14:11:44 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-06-06 14:11:44 -0500 |
| commit | 057ed6b4fb11e906b5e7f652aa4cc6c5ae4cff27 (patch) | |
| tree | 5c4558101e7456a5ce5f5529bec1d2ce23891363 /Library/Homebrew | |
| parent | 9a741810c8b7f7971294663cf62c26fdbe9c740c (diff) | |
| download | brew-057ed6b4fb11e906b5e7f652aa4cc6c5ae4cff27.tar.bz2 | |
bottles: use String#[] instead of "captures.first rescue nil"
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 159654c48..96562f6c3 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -42,8 +42,8 @@ def bottle_file_outdated? f, file return nil unless f and f.bottle and f.bottle.url \ and filename.match(bottle_regex) - bottle_ext = filename.match(bottle_native_regex).captures.first rescue nil - bottle_url_ext = f.bottle.url.match(bottle_native_regex).captures.first rescue nil + bottle_ext = filename[bottle_native_regex, 1] + bottle_url_ext = f.bottle.url[bottle_native_regex, 1] bottle_ext && bottle_url_ext && bottle_ext != bottle_url_ext end |
