Skip to content

End of Life Ruby 3.0 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

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.