Issue #496 has been updated by Brian Candler.


OK, how about this:

  require 'socket'
  t = TCPServer.new("", nil)
  t.addr
  t.addr

  Socket.do_not_reverse_lookup=true
  t.addr

On my machine, the first 't.addr' invocations take about 5 seconds. The last one is instant. I believe this is because of the delay looking up 0.0.0.0 in the DNS.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/496

----------------------------------------
http://redmine.ruby-lang.org