From: Timothy Goddard Date: 2006-02-12T19:38:25+09:00 Subject: Re: Simultaneous text input/output in a command line game As a method without having to worry about threads you could also use: require 'timeout' messages = ["What are you waiting for?", "I don't have all day.", "When I said 'take your time', I didn't mean this long!", "Hurry up and enter a value!"] s = nil until s begin Timeout::timeout(5) do puts "Enter a value: " s = gets end rescue Timeout::Error puts messages[rand(messages.length).to_i] end end