From: nobu.nokada@... Date: 2005-05-15T09:55:41+09:00 Subject: Re: re-opening STDIN after it's been closed? Hi, At Sun, 15 May 2005 06:20:24 +0900, David Vincelli wrote in [ruby-talk:142655]: > while (true) do > puts "Make your selection from the list below: \n\n" > puts "a) foo\n" > puts "b) bar\n\n" > gets > handle_action($_) > end You should alwasy check if get succeeded. prompt = < I think it might be better to simply re-open STDIN as if nothing had > happened.. is this a good idea and is it possible? No way to do it. If you believe STDIN is connected to tty, you may want to do STDIN.reopen("/dev/tty"). -- Nobu Nakada