Clarify error message.
This commit is contained in:
parent
b9741dd1e6
commit
775c2fd245
@ -49,6 +49,8 @@ module Homebrew
|
|||||||
def self.page_matches(url, regex, &block)
|
def self.page_matches(url, regex, &block)
|
||||||
page = Strategy.page_contents(url)
|
page = Strategy.page_contents(url)
|
||||||
|
|
||||||
|
odebug "Page Contents", page
|
||||||
|
|
||||||
if block
|
if block
|
||||||
data = { page: page }
|
data = { page: page }
|
||||||
case (value = block.call(data))
|
case (value = block.call(data))
|
||||||
@ -57,7 +59,7 @@ module Homebrew
|
|||||||
when Array
|
when Array
|
||||||
return value
|
return value
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user