Skip to content

Commit

Permalink
Don't use obsoleted URI.regexp
Browse files Browse the repository at this point in the history
`URI.regexp` is obsoleted since Ruby 2.2.

```
$ ruby -w -r "uri" -e "URI::regexp"
-e:1: warning: URI.regexp is obsolete
```
  • Loading branch information
y-yagi committed Jun 6, 2024
1 parent e1eb8ea commit 0daa5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/openid_connect/client/registrar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def sector_identifier_required?

def valid_uri?(uri, schemes = ['http', 'https'])
# NOTE: specify nil for schemes to allow any schemes
URI::regexp(schemes).match(uri).present?
URI::DEFAULT_PARSER.make_regexp(schemes).match(uri).present?
end

def validate_contacts
Expand Down

0 comments on commit 0daa5da

Please sign in to comment.