Ruby’s default socket connection timeout can be too long in many situations (e.g. when feedback needs to be provided to a user that has just entered a host name to connect to). On my Mountain Lion laptop, it takes close to 75 seconds for it to fail to connect to an unused IP address: irb> require 'benchmark' irb> puts Benchmark.measure { TCPSocket.new("192.178.1.2", 9090) rescue nil } 0.000000 0.0

