I found what I thought should work perfectly at http://stackoverflow.com/questions/517219?tab=oldest#tab-top but, it did not work for me.
I have Ruby 1.9.1 installed on Windows and, when I try the example "is_port_open" test, it does not work. The socket call still takes around 20 seconds to timeout no matter what value I set for the timeout. Any ideas why?