Luo Yong wrote:

> Hi all,
> 
> I found that the STDIN.getc seem using a buffered input.It can't
> return anything until you enter a "\n".
> 
> Is there any way to get a character directly from keyboard?

As it turns out, this is a question that I have seen asked very often in
Usenet groups over the years, for all computer languages. Here is the
answer:

Without exploiting external, OS-specific packages like "curses" or the
features of particular compilers on specific platforms, you cannot do this.
If you don't care whether your application remains portable between
platforms and you are willing to invoke OS-specific external features, then
there is always some way to do it.

To put it another way, there is no Ruby way to do this.

-- 
Paul Lutus
http://www.arachnoid.com