Allow regex without capture groups.

This commit is contained in:
Markus Reiter 2020-12-15 20:08:53 +01:00 committed by Sam Ford
parent 8a583a7aee
commit 0deceac28c
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -61,7 +61,14 @@ module Homebrew
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
# Checks the content at the URL for new versions, using the provided