aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 23a123c44..8b4cddc59 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -181,8 +181,8 @@ class TapFormulaAmbiguityError < RuntimeError
@name = name
@paths = paths
@formulae = paths.map do |path|
- path.to_s =~ HOMEBREW_TAP_PATH_REGEX
- "#{Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))}/#{path.basename(".rb")}"
+ match = path.to_s.match(HOMEBREW_TAP_PATH_REGEX)
+ "#{Tap.fetch(match[:user], match[:repo])}/#{path.basename(".rb")}"
end
super <<-EOS.undent