From: matthew@... Date: 2017-01-24T12:11:33+00:00 Subject: [ruby-core:79238] [Ruby trunk Misc#13154] URI::Generic, == operator, normalize! Issue #13154 has been updated by Matthew Kerwin. Dmitry Sk wrote: > But nil scheme actually equivalent to file Are you sure? I thought a `URI::Generic` object with a `nil` scheme is a [relative reference](https://tools.ietf.org/html/rfc3986#section-4.2). See: [URI::Generic#merge](https://ruby-doc.org/stdlib-2.4.0/libdoc/uri/rdoc/URI/Generic.html#method-i-merge) and [#relative?](https://ruby-doc.org/stdlib-2.4.0/libdoc/uri/rdoc/URI/Generic.html#method-i-relative-3F) ---------------------------------------- Misc #13154: URI::Generic, == operator, normalize! https://bugs.ruby-lang.org/issues/13154#change-62654 * Author: Dmitry Sk * Status: Open * Priority: Normal * Assignee: ---------------------------------------- This two URI means the same: ``` uri1 = URI::parse '/1/2/3' uri2 = URI::parse 'file:///1/2/3' `` but `uri1 == uri2` return **false** it is cause of normalize! implementation that compare scheme this way: ``` if scheme && scheme != scheme.downcase set_scheme(self.scheme.downcase) end ``` But nil scheme actually equivalent to file -- https://bugs.ruby-lang.org/ Unsubscribe: