From: "F. Senault" Date: 2010-07-14T17:00:04+09:00 Subject: Re: gets() -- Need to skip when no response after 20seconds Le 14 juillet � 08:22, Raveendran .P a �crit : > Need: > > a=gets() is waiting for input. I need to wait only 20 seconds. Look at the Timeout standard library : begin Timeout.timeout(20) do a = gets() end rescue Timeout::Error puts "Timeout. 20 seconds gone, etc" end Fred -- What would be the point of cyphering messages that very clever enemies couldn't break? You'd end up not knowing what they thought you thought they were thinking... (Terry Pratchett, in The Fifth Elephant)