We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ace52e6 commit 321d0e2Copy full SHA for 321d0e2
lib/dry/logic/predicates.rb
@@ -185,9 +185,16 @@ def uuid_v7?(input) = format?(UUIDv7, input)
185
186
def uuid_v8?(input) = format?(UUIDv8, input)
187
188
- def uri?(schemes, input)
189
- uri_format = ::URI::RFC2396_PARSER.make_regexp(schemes)
190
- format?(uri_format, input)
+ if defined?(::URI::RFC2396_PARSER)
+ def uri?(schemes, input)
+ uri_format = ::URI::RFC2396_PARSER.make_regexp(schemes)
191
+ format?(uri_format, input)
192
+ end
193
+ else
194
195
+ uri_format = ::URI::DEFAULT_PARSER.make_regexp(schemes)
196
197
198
end
199
200
def uri_rfc3986?(input) = format?(::URI::RFC3986_Parser::RFC3986_URI, input)
0 commit comments