Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
IO#iflush
() -> self
io.iflush
ext/io/console/console.c
View on GitHub ↗
static VALUE
console_iflush(VALUE io)
{
#if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
int fd = GetReadFD(io);
if (tcflush(fd, TCIFLUSH)) sys_fail(io);
#endif
return io;
}
Flushes input buffer in kernel.
You must require ‘io/console’ to use this method.
See also
#hide_cursor
#input_pending?
#goto_column
#inspect
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0