URI::Generic, == operator, normalize!
This two URI means the same:
uri1 = URI::parse '/1/2/3' uri2 = URI::parse 'file:///1/2/3'
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
Updated by phluid61 (Matthew Kerwin) over 4 years ago
Updated by jeremyevans0 (Jeremy Evans) 12 days ago
- Status changed from Open to Rejected
I agree with phluid61 (Matthew Kerwin), plain path provided to
URI.parse should not be treated as implicit
file scheme. Such a change would break backwards compatibility for the methods mentioned, and I think
URI.parse('http://foo/bar').merge(URI.parse('/1/2/3')) should result in
#<URI::HTTP http://foo/1/2/3> and not