Closed RonRicardo closed 3 months ago
In Ruby 3.4.0+, calling URI::HTTPS.build(host: "") does not raise URI::InvalidComponentError as expected. Instead, it returns #<URI::HTTPS https://>
URI::HTTPS.build(host: "")
URI::InvalidComponentError
#<URI::HTTPS https://>
I think this was introduced in this PR.
Run:
host
irb(main):008:0> RUBY_VERSION => "3.1.4" irb(main):009:0> URI::HTTPS.build(host:"") /home/vscode/.rbenv/versions/3.1.4/lib/ruby/3.1.0/uri/generic.rb:601:in `check_host': bad component(expected host component): (URI::InvalidComponentError)
irb(…):015> RUBY_VERSION => "3.4.0" irb(...):016> URI::HTTPS.build(host:"") => #<URI::HTTPS https://>
Closed this issue in favor of: https://bugs.ruby-lang.org/issues/20686
In Ruby 3.4.0+, calling
URI::HTTPS.build(host: "")
does not raiseURI::InvalidComponentError
as expected. Instead, it returns#<URI::HTTPS https://>
I think this was introduced in this PR.
Steps to Reproduce
1. Environment:
2. Steps:
Run:
3. Expected Behavior:
URI::InvalidComponentError
should be raised due to the invalid emptyhost
component.4. Actual Behavior:
#<URI::HTTPS https://>
without raising an error.Ruby 3.1.4:
Ruby 3.4.0: