Sparkle: Use demodulized class name in error text

This commit is contained in:
Sam Ford 2020-12-18 22:12:10 -05:00
parent 0d7c8c8c61
commit f5774c1af4
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -19,7 +19,7 @@ module Homebrew
# Checks the content at the URL for new versions.
sig { params(url: String, regex: T.nilable(Regexp)).returns(T::Hash[Symbol, T.untyped]) }
def self.find_versions(url, regex, &block)
raise ArgumentError, "The #{NICE_NAME} strategy does not support regular expressions." if regex
raise ArgumentError, "The #{name.demodulize} strategy does not support regular expressions." if regex
match_data = { matches: {}, regex: regex, url: url }