The test does not allow a url with only a scheme is failing in Ruby 3.1.4
A scheme only url is passing as valid: http://
Looks like the reason is changed behavior in the URI class:
In Ruby 3.0.6:
[1] pry(main)> uri = URI.parse('http://')
=> #<URI::HTTP http:>
[2] pry(main)> uri.host
=> nil
→ uri.host returns nil
In Ruby 3.1.4:
[1] pry(main)> uri = URI.parse('http://')
=> #<URI::HTTP http://>
[2] pry(main)> uri.host
=> ""
→ uri.host returns an empty string
URI is used here
The test does not allow a url with only a scheme is failing in Ruby 3.1.4
A scheme only url is passing as valid:
http://Looks like the reason is changed behavior in the URI class:
In Ruby 3.0.6:
→ uri.host returns nil
In Ruby 3.1.4:
→ uri.host returns an empty string
URI is used here