From 057ed6b4fb11e906b5e7f652aa4cc6c5ae4cff27 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 6 Jun 2013 14:11:44 -0500 Subject: bottles: use String#[] instead of "captures.first rescue nil" --- Library/Homebrew/bottles.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3