aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.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/download_strategy.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/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index ddbf0ea52..78f6c1e28 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -517,8 +517,8 @@ class S3DownloadStrategy < CurlDownloadStrategy
if @url !~ %r{^https?://([^.].*)\.s3\.amazonaws\.com/(.+)$}
raise "Bad S3 URL: " + @url
end
- bucket = $1
- key = $2
+ bucket = Regexp.last_match(1)
+ key = Regexp.last_match(2)
ENV["AWS_ACCESS_KEY_ID"] = ENV["HOMEBREW_AWS_ACCESS_KEY_ID"]
ENV["AWS_SECRET_ACCESS_KEY"] = ENV["HOMEBREW_AWS_SECRET_ACCESS_KEY"]