For almost all web sites, such as www.ruby-lang.org, the code

Net::HTTP.get_print 'www.ruby-lang.org', '/'

works without a problem, returning the home page.

However, 'ad.doubleclick.net' is an exception.  The code;

Net::HTTP.get_print 'ad.doubleclick.net', '/'

times out.  If you access this site in a web browser, there is no 
problem getting the home page from doubleclick; it arrives almost 
immediately.

By watching the ethernet traffic, it seems that doubleclick replies 
from a different IP address than the address corresponding to the 
domain name, but ruby keeps listening to responses from the domain 
address  (note this is _not_ a 302 redirect; it is all happening at a 
much lower level).  Eventually, there is a timeout error from 
/usr/local/lib/ruby/1.6/net/protocol.rb:449:in `initialize'.  Is this 
possible within the TCP/IP protocol?  Is this something that has been 
dealt with in a latter release (I am still using ruby 1.6.8).  Is there 
some workaround?

Nigel