From: zhoujing@... (TOTO) Date: 2003-01-09T11:56:00+09:00 Subject: Re: prompt Brennan Leathers wrote in message news:<67484A65-232D-11D7-9C75-000393C4FE10@mac.com>... > On Wednesday, January 8, 2003, at 10:34 AM, TOTO wrote: > > > Is there a Ruby idiom to do prompting? For example, > > > > ../rm.rb: remove `t'? y > > also, couldn't you do this with the readline module? > > brennan gets doesn't work. I tried it at the beginning. I think the problem is that it Reads the *next* ``line'' from the I/O stream. (So it can't read the string following the question mark.) And I thought that readline was simular to gets: Reads a line as with IO#gets , but raises an EOFError on end of file. However, it turns out ok. That is quite strange.