From: Mamba Black Date: 2013-01-30T23:54:24+09:00 Subject: TCPServer.new().close Hi, Please correct if my understanding is wrong for the below code:- Code to check if a port is free or not. def port_available?(port) begin TCPServer.new('localhost', port).close rescue return false else return true end end Port will be closed. While closing if an exception occurs, it returns false. Else true. Thanks -- Posted via http://www.ruby-forum.com/.