End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Readline.pre_input_hook=
Readline.pre_input_hook = proc
ext/readline/readline.c
View on GitHub ↗
static VALUE
readline_s_set_pre_input_hook(VALUE self, VALUE proc)
{
mustbe_callable(proc);
return rb_ivar_set(mReadline, id_pre_input_hook, proc);
}
Specifies a Proc object proc to call after the first prompt has been printed and just before readline starts reading input characters.
See GNU Readline’s rl_pre_input_hook variable.
Raises ArgumentError if proc does not respond to the call method.
Raises NotImplementedError if the using readline library does not support.