From: Eustaquio Rangel de Oliveira J Date: 2006-03-27T13:17:16+09:00 Subject: Re: input without blocking > How do you do something like gets but without > blocking? All I want to > do is try to see if anything was input and if it > wasn't then just go on > running the rest of my code. Maybe you're looking for: taq@taq$ irb irb(main):001:0> require "timeout" => true irb(main):002:0> s = irb(main):003:0* begin irb(main):004:1* timeout(5) do irb(main):005:2* gets irb(main):006:2> end irb(main):007:1> rescue TimeoutError irb(main):008:1> "" irb(main):009:1> end If on 5 seconds you don't type something, s will be an empty string. Best regards, ---------------------------- Eust�quio "TaQ" Rangel eustaquiorangel@yahoo.com http://beam.to/taq Usu�rio GNU/Linux no. 224050