Rubyers & rubyees:

I'm getting delays making TCP connections to "localhost" on our OS X 
box.

On Linux boxes (tried three of them, 1.6.7, 1.6.8, and 1.8 pre 2) I get 
this:

> [john@linux ~]$ irb
> irb(main):002:0> require 'socket'
> => true
> irb(main):003:0> TCPSocket.open("localhost", 1234)

...and immediately...

> Errno::ECONNREFUSED: Connection refused - "connect(2)"
>         from (irb):3:in `open'
>         from (irb):3
> irb(main):004:0> exit

Which is exactly what I expect.

But on our Mac OS X box (running 1.8.0-preview 3):

> [john@mac ~]$ irb
> irb(main):002:0> require 'socket'
> => true
> irb(main):003:0> s = TCPSocket.open("localhost", 1234)

...at least 4 seconds delay here...

> Errno::ECONNREFUSED: Connection refused - connect(2)
>         from (irb):3:in `initialize'
>         from (irb):3:in `open'
>         from (irb):3
> irb(main):004:0> exit

The same delay applies when connecting to a port that is running a 
service, btw -- the Linux box returns a TCPSocket right away and the 
Mac succeeds after the delay.

I found this problem when running a DRuby example in Madeleine, so as 
you might imagine, I'm rather eager to get this fixed so I can write 
programs that operate without huge delays!

-- 
John Platte
Principal Consultant, NIKA Consulting
http://nikaconsulting.com/