From: "Duan, Jingjing" Date: 2011-11-10T15:19:54+09:00 Subject: Re: How timeout $stdin.gets ? Which version of ruby did you use? It works for me. ruby-1.9.2-p180 :003 > Timeout.timeout(1) do ruby-1.9.2-p180 :004 > line = gets ruby-1.9.2-p180 :005?> end Timeout::Error: execution expired from (irb):4:in `gets' from (irb):4:in `gets' from (irb):4:in `block in irb_binding' from (irb):3 from /home/jduan/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `
' -Jingjing -----Original Message----- From: Kyung won Cheon [mailto:chonkw@nate.com] Sent: Wednesday, November 09, 2011 10:15 PM To: ruby-talk ML Subject: How timeout $stdin.gets ? timeout(1) do $stdin.gets end This program is not stopped until user input enter key. Help me!! -- Posted via http://www.ruby-forum.com/.