Hi,

> Net::HTTP tries to connect localhost when host is nil.
> Please try the code below and let me know the result.
> ruby exits normally, or hang?
> 
>     $ ruby -rsocket -e 'TCPSocket.open(nil,80)'".

-----------
ruby -rsocket -e 'TCPSocket.open(nil,80)'
---------
entered in the commandline brings:
-------------
-e:1:in 'open': wrong argument type nil (expected String) (TypeError)
       from -e:1
-------------

But: If I'm downloading from the web, and a nil domain slips in, I don't
want to connect to localhost. If I want to connect to localhost, I write
'localhost'. Also: if there's no localhost, I would like to get a nice
error message.

Tobi

-- 
Tobias Reif
http://www.pinkjuice.com/myDigitalProfile.xhtml

go_to('www.ruby-lang.org').get(ruby).play.create.have_fun