Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IO#console_mode
() -> ::IO::ConsoleMode
io.console_mode → mode
ext/io/console/console.c
View on GitHub ↗
static VALUE
console_conmode_get(VALUE io)
{
conmode t;
int fd = GetReadFD(io);
if (!getattr(fd, &t)) sys_fail(io);
return conmode_new(cConmode, &t);
}
Returns a data represents the current console mode.
You must require ‘io/console’ to use this method.