Project

General

Profile

Actions

Bug #19258

closed

URI::Generic#host returns empty string instead of nil

Added by janko (Janko Marohnić) almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22]
[ruby-core:111427]

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 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

Also available in: Atom PDF

Like0
Like0Like0Like0