Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IO#raw!
(?min: ::int, ?time: ::int, ?intr: bool) -> self
io.raw!(min: nil, time: nil, intr: nil) → io
ext/io/console/console.c
View on GitHub ↗
static VALUE
console_set_raw(int argc, VALUE *argv, VALUE io)
{
conmode t;
rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 0, &opts);
int fd = GetReadFD(io);
if (!getattr(fd, &t)) sys_fail(io);
set_rawmode(&t, optp);
if (!setattr(fd, &t)) sys_fail(io);
return io;
}
Enables raw mode, and returns io.
If the terminal mode needs to be back, use io.raw { ... }.
See IO#raw for details on the parameters.
You must require ‘io/console’ to use this method.