From: janko via ruby-core Date: 2022-12-25T23:52:06+00:00 Subject: [ruby-core:111429] [Ruby master Bug#19258] URI::Generic#host returns empty string instead of nil Issue #19258 has been updated by janko (Janko Marohni��). Thanks or the update, makes sense, I will try to get Excon updated then. ---------------------------------------- Bug #19258: URI::Generic#host returns empty string instead of nil https://bugs.ruby-lang.org/issues/19258#change-100800 * Author: janko (Janko Marohni��) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- On Ruby 3.1, `URI::Generic#host` would return `nil` for `unix:///` URLs, but on Ruby 3.2 it now returns an empty string: ```rb 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](https://github.com/excon/excon/blob/efd48747fe6c6fa959e787aa5949241cd762f8f3/lib/excon/connection.rb#L92) for UNIX URLs when `:host` is not `nil`. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/