mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/readline/readline.c (Init_readline): libedit check
rl_getc_function only when rl_initialize() is called, and using_history() call rl_initialize(). This assignment should be placed before using_history(). [ruby-core:40641] [Bug #5539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e89bebdab4
commit
ec4f9d1c60
2 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Dec 23 15:59:05 2011 TAKAO Kouji <kouji@takao7.net>
|
||||
|
||||
* ext/readline/readline.c (Init_readline): libedit check
|
||||
rl_getc_function only when rl_initialize() is called, and
|
||||
using_history() call rl_initialize(). This assignment should be
|
||||
placed before using_history(). [ruby-core:40641] [Bug #5539]
|
||||
|
||||
Fri Dec 23 10:14:47 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/thread/test_queue.rb (test_thr_kill): show the number of loop
|
||||
|
|
|
@ -1495,6 +1495,16 @@ Init_readline()
|
|||
/* Allow conditional parsing of the ~/.inputrc file. */
|
||||
rl_readline_name = (char *)"Ruby";
|
||||
|
||||
#if defined HAVE_RL_GETC_FUNCTION
|
||||
/* libedit check rl_getc_function only when rl_initialize() is called, */
|
||||
/* and using_history() call rl_initialize(). */
|
||||
/* This assignment should be placed before using_history() */
|
||||
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 +1650,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
|
||||
|
|
Loading…
Add table
Reference in a new issue