Method: IO#noecho

Defined in:
console/console.c

#noecho {|io| ... } ⇒ Object

Yields self with disabling echo back.

STDIN.noecho(&:gets)

will read and return a line without echo back.

You must require ‘io/console’ to use this method.

Yields:

  • (io)


596
597
598
599
600
# File 'console/console.c', line 596

static VALUE
console_noecho(VALUE io)
{
    return ttymode(io, rb_yield, io, set_noecho, NULL);
}