On my Mac OSX,

    TCPSocket.new('localhost', 'echo')

raises EINVAL:

Errno::EINVAL: Invalid argument - "connect(2)"
         from (irb):2:in `initialize'
         from (irb):2:in `new'
         from (irb):2


This breaks ping.rb, which seems to assume it will be seeing 
ECONNREFUSED. This means that pingecho('localhost') returns false on my box.

Is this expected behavior?


Cheers


Dave