diff options
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index a5388c2f4..23a123c44 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -182,7 +182,7 @@ class TapFormulaAmbiguityError < RuntimeError @paths = paths @formulae = paths.map do |path| path.to_s =~ HOMEBREW_TAP_PATH_REGEX - "#{Tap.fetch($1, $2)}/#{path.basename(".rb")}" + "#{Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))}/#{path.basename(".rb")}" end super <<-EOS.undent @@ -202,7 +202,7 @@ class TapFormulaWithOldnameAmbiguityError < RuntimeError @taps = possible_tap_newname_formulae.map do |newname| newname =~ HOMEBREW_TAP_FORMULA_REGEX - "#{$1}/#{$2}" + "#{Regexp.last_match(1)}/#{Regexp.last_match(2)}" end super <<-EOS.undent @@ -504,7 +504,7 @@ class CurlDownloadStrategyError < RuntimeError def initialize(url) case url when %r{^file://(.+)} - super "File does not exist: #{$1}" + super "File does not exist: #{Regexp.last_match(1)}" else super "Download failed: #{url}" end |
