Allow regex without capture groups.
This commit is contained in:
parent
8a583a7aee
commit
0deceac28c
@ -61,7 +61,14 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
page.scan(regex).map(&:first).uniq
|
page.scan(regex).map do |match|
|
||||||
|
case match
|
||||||
|
when String
|
||||||
|
match
|
||||||
|
else
|
||||||
|
match.first
|
||||||
|
end
|
||||||
|
end.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
# Checks the content at the URL for new versions, using the provided
|
# Checks the content at the URL for new versions, using the provided
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user