From 6720f8bd1e0237a44bbc0f53769a9d232fb19d62 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Mon, 17 May 2021 23:52:55 +0900 Subject: [PATCH] repair pub-date in livecheck --- Library/Homebrew/livecheck/strategy/sparkle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/livecheck/strategy/sparkle.rb b/Library/Homebrew/livecheck/strategy/sparkle.rb index efff18965e..5ba6abc26f 100644 --- a/Library/Homebrew/livecheck/strategy/sparkle.rb +++ b/Library/Homebrew/livecheck/strategy/sparkle.rb @@ -75,7 +75,7 @@ module Homebrew version ||= (item > "version").first&.text&.strip title = (item > "title").first&.text&.strip - pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } + pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } || Time.new(0) if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/)) short_version ||= match[1]