Clarify error message.

This commit is contained in:
Markus Reiter 2020-12-14 02:16:01 +01:00 committed by Sam Ford
parent b9741dd1e6
commit 775c2fd245
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -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