Actions
Bug #19258
closedURI::Generic#host returns empty string instead of nil
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22]
Description
On Ruby 3.1, URI::Generic#host
would return nil
for unix:///
URLs, but on Ruby 3.2 it now returns an empty string:
uri = URI.parse("unix:///var/run/docker.sock")
uri.host #=>
# Ruby 3.1: nil
# Ruby 3.2: ""
This introduced a regression in the Excon gem, which currently doesn't handle these URLs on Ruby 3.2, because it aborts for UNIX URLs when :host
is not nil
.
Actions
Like0
Like0Like0Like0