From 8c9a6e3379331640b5556dd83732c23428cd724a Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 27 Jun 2024 12:27:30 +0100 Subject: [PATCH] Add a comment for what and why we're rescuing --- 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 9d54d1f2c7..9c7574b03f 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -522,7 +522,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy .flat_map { |headers| [*headers["last-modified"]] } .filter_map do |t| t.match?(/^\d+$/) ? Time.at(t.to_i) : Time.parse(t) - rescue ArgumentError + rescue ArgumentError # When `Time.parse` gets a badly formatted date. nil end