Net::HTTP and numerical adress

if i use :
Net::HTTP.start(‘http://88.183.xyz.uvw’)
with numerical (i don’t have a domain name)
i get an error :

essais/download_files.rb:16: no . floating literal anymore; put 0
before dot
http://88.183.xyz.uvw
^

does it mean Net:HTTP wants to translate the numbers given ?
being somehow a bug for an address right ?

Une Bévue [email protected] wrote:

does it mean Net:HTTP wants to translate the numbers given ?
not at all, i wasn’t reading the right line…
sorry for the noise

however it seems Net::HTTP can’t download a file from an unregistered
domain :
/opt/local/lib/ruby1.9/1.9.1/net/http.rb:581:in `initialize’:
getaddrinfo: nodename nor servname provided, or not known (SocketError)

Une Bévue wrote:

Une B�vue [email protected] wrote:

does it mean Net:HTTP wants to translate the numbers given ?
not at all, i wasn’t reading the right line…
sorry for the noise

however it seems Net::HTTP can’t download a file from an unregistered
domain :

Net::HTTP.start doesn’t take a url, it takes a hostname and optional
port.

res = Net::HTTP.start(‘216.239.59.147’) { |h| h.get(‘/’) }
=> #<Net::HTTPOK 200 OK readbody=true>

Brian C. [email protected] wrote:

Net::HTTP.start doesn’t take a url, it takes a hostname and optional
port.

res = Net::HTTP.start(‘216.239.59.147’) { |h| h.get(‘/’) }
=> #<Net::HTTPOK 200 OK readbody=true>

OK, thanks !