aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tap.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-06-12 16:47:28 +0100
committerGitHub2017-06-12 16:47:28 +0100
commited9942fbd1ec4243f0a92ab8f9b2411c8b1fb091 (patch)
treeda996e44297436c16df99318b70ea08b80a3461d /Library/Homebrew/tap.rb
parent22c431d221ca25413f3b63374d75173bedbe9e66 (diff)
parent7a0aff1080ba475f495353cf8686fbe928b6ebde (diff)
downloadbrew-1.2.3.tar.bz2
Merge pull request #2769 from MikeMcQuaid/rubocop-no-perl-backrefs1.2.3
rubocop: don’t allow Perl regex backrefs.
Diffstat (limited to 'Library/Homebrew/tap.rb')
-rw-r--r--Library/Homebrew/tap.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb
index 66aa10158..0aabce6c3 100644
--- a/Library/Homebrew/tap.rb
+++ b/Library/Homebrew/tap.rb
@@ -43,8 +43,8 @@ class Tap
def self.from_path(path)
path.to_s =~ HOMEBREW_TAP_PATH_REGEX
- raise "Invalid tap path '#{path}'" unless $1
- fetch($1, $2)
+ raise "Invalid tap path '#{path}'" unless Regexp.last_match(1)
+ fetch(Regexp.last_match(1), Regexp.last_match(2))
rescue
# No need to error as a nil tap is sufficient to show failure.
nil