Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test in Ruby 3.1 #152

Open
destsimon opened this issue Feb 14, 2024 · 0 comments
Open

Failing test in Ruby 3.1 #152

destsimon opened this issue Feb 14, 2024 · 0 comments

Comments

@destsimon
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant