From: ts Date: 2003-07-29T16:35:35+09:00 Subject: Re: aSocket.select >>>>> "P" == Paul Argentoff writes: P> This is obvious, and I wouldn't ask the question if I was glad with this P> pattern. My question was: if I use select as a method of aSocket object (anIO P> inherently, which is documented), how can I specify a timeout then. The P> interpreter says that anObject.select must be used with 0 arguments, but that P> seems to be stupid... -- why do I need select if I cannot specify he P> request's time boundary? You make the confusion between Kernel::select and Enumerable#select svg% ruby -rsocket -e 'p TCPsocket.new("localhost", 25).select(1)' -e:1:in `select': wrong number of arguments(1 for 0) (ArgumentError) from -e:1 svg% svg% ruby -rsocket -e 'p TCPsocket.new("localhost", 25).select' -e:1:in `select': no block given (LocalJumpError) from -e:1:in `each' from -e:1:in `select' from -e:1 svg% You must use IO::select to specify a timeout Guy Decoux