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
.
Updated by hsbt (Hiroshi SHIBATA) almost 2 years ago
This is an intentional change. See https://hackerone.com/reports/156615
Updated by janko (Janko Marohnić) almost 2 years ago
Thanks or the update, makes sense, I will try to get Excon updated then.
Updated by hsbt (Hiroshi SHIBATA) almost 2 years ago
- Status changed from Open to Closed
Thanks for trying Ruby 3.2 quickly.
Actions
Like0
Like0Like0Like0