Does this URI.parse http:/ bug has been fixed in Ruby 1.9?

Hello list,
I'm looking for someone with a Ruby 1.9 installation for a quick test.

I just discovered a bug in URI.parse.
This to run the following code:

URI.parse("http:/foo.bar.com")

It returns an URI object but I would expect an error.

#<URI::HTTP:0x2dc35a URL:http:/foo.bar.com>

Someone can tell me if Ruby 1.9 addressed this bug?

Thanks,
-- Simone

Someone can tell me if Ruby 1.9 addressed this bug?

vgs% ./ruby -ruri -ve 'p URI.parse("http:/foo.bar.com")'
ruby 1.9.0 (2008-03-04 revision 15686) [i686-linux]
#<URI::HTTP:0xb7c45d44 URL:http:/foo.bar.com>
vgs%

Guy Decoux

Hi,

At Tue, 4 Mar 2008 22:44:59 +0900,
Simone Carletti wrote in [ruby-talk:293487]:

I just discovered a bug in URI.parse.

It's not a bug.

This to run the following code:

> URI.parse("http:/foo.bar.com")

It returns an URI object but I would expect an error.

It is a valid URI which doesn't have host part.

irb(main):001:0> require 'uri'
=> true
irb(main):002:0> uri = URI.parse("http:/foo.bar.com")
=> #<URI::HTTP:0xb77f4038 URL:http:/foo.bar.com>
irb(main):003:0> uri.path
=> "/foo.bar.com"
irb(main):004:0> uri.host
=> nil

ยทยทยท

--
Nobu Nakada