From 775c2fd245c5a2eb9976885778ff91d7b6c66b35 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 14 Dec 2020 02:16:01 +0100 Subject: [PATCH] Clarify error message. --- Library/Homebrew/livecheck/strategy/page_match.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/livecheck/strategy/page_match.rb b/Library/Homebrew/livecheck/strategy/page_match.rb index 4e778bae6f..067a61c2f3 100644 --- a/Library/Homebrew/livecheck/strategy/page_match.rb +++ b/Library/Homebrew/livecheck/strategy/page_match.rb @@ -49,6 +49,8 @@ module Homebrew def self.page_matches(url, regex, &block) page = Strategy.page_contents(url) + odebug "Page Contents", page + if block data = { page: page } case (value = block.call(data)) @@ -57,7 +59,7 @@ module Homebrew when Array return value else - raise TypeError, "Return value of `strategy :page_match` block must be a string or array." + raise TypeError, "Return value of `strategy :page_match` block must be a string or array of strings." end end