From: Bertram Scharpf Date: 2007-08-26T22:35:52+09:00 Subject: Re: Newbie questions Hi, Am Sonntag, 26. Aug 2007, 15:15:04 +0900 schrieb William James: > On Aug 25, 7:16 pm, Bertram Scharpf wrote: > > Am Sonntag, 26. Aug 2007, 07:00:06 +0900 schrieb William James: > > > def getkey > > > select( [$stdin], nil, nil, 0.01 ) ? c = $stdin.getc : c = nil > > > end > > > > It doesn't work here; it still waits for the enter key. > > It works here under windoze; I can't test it under unix. That was what I meant: You did not test it on a POSIX system. You wrote: if RUBY_PLATFORM =~ /win32/ [...] else def getkey select( [$stdin], nil, nil, 0.01 ) ? c = $stdin.getc : c = nil end end As long as there are no parsing errors this alway works under Windows. I tested it under Linux and there, it doesn't work. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de