From: Jano Svitok Date: 2007-05-18T22:23:58+09:00 Subject: Re: URI::merge bug? On 5/18/07, Alex Young wrote: > Hi all, > > I'm not sure whether this is a bug: > > irb(main):013:0> a = URI.parse("http://www.example.com/foo/bar?a=b") > => # > irb(main):014:0> b = URI.parse("?a=c") > => # > irb(main):015:0> puts a.merge(b).to_s > http://www.example.com/foo/?a=c > > I'd expect the last line to be "http://www.example.com/foo/bar?a=c" - it > seems to lose the last element of the path. Firefox seems to think do > what I'm expecting, anyway... Can someone more au fait with URI RFC's > comment? Hi, have alook at what "?a=c" parses to, i.e. if it is interpreted as "/?a=c" that would explain the behaviour. J.