diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 198f0e6..8ffeeef 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -1495,6 +1495,13 @@ Init_readline() /* Allow conditional parsing of the ~/.inputrc file. */ rl_readline_name = (char *)"Ruby"; +#if defined HAVE_RL_GETC_FUNCTION + rl_getc_function = readline_getc; + id_getbyte = rb_intern_const("getbyte"); +#elif defined HAVE_RL_EVENT_HOOK + rl_event_hook = readline_event; +#endif + using_history(); completion_proc = rb_intern(COMPLETION_PROC); @@ -1640,12 +1647,6 @@ Init_readline() rb_define_const(mReadline, "VERSION", version); rl_attempted_completion_function = readline_attempted_completion_function; -#if defined HAVE_RL_GETC_FUNCTION - rl_getc_function = readline_getc; - id_getbyte = rb_intern_const("getbyte"); -#elif defined HAVE_RL_EVENT_HOOK - rl_event_hook = readline_event; -#endif #ifdef HAVE_RL_CATCH_SIGNALS rl_catch_signals = 0; #endif