From 278bba05236c0a2ca62fa686ae99a42dc8b20fcb Mon Sep 17 00:00:00 2001 From: Chris Tompkinson Date: Thu, 12 Mar 2020 11:32:47 +0000 Subject: [PATCH] Use concise method for both header and headers --- Library/Homebrew/download_strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index b08f7c8207..14a74e75c9 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -423,7 +423,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy args += ["--header", meta.fetch(:header)] if meta.key?(:header) - meta.fetch(:headers).each { |h| args += ["--header", h.strip] } if meta.key?(:headers) + args += [meta.fetch(:header), *meta.fetch(:headers)].compact.flat_map { |h| ["--header", h.strip] } args end