ruby-changes:24076
From: naruse <ko1@a...>
Date: Tue, 19 Jun 2012 11:58:52 +0900 (JST)
Subject: [ruby-changes:24076] naruse:r36127 (trunk): * ext/readline/readline.c (readline_getc): fix editline compatibility
naruse 2012-06-19 11:58:40 +0900 (Tue, 19 Jun 2012) New Revision: 36127 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36127 Log: * ext/readline/readline.c (readline_getc): fix editline compatibility broken by r36123. [Bug #6601] Modified files: trunk/ChangeLog trunk/ext/readline/readline.c trunk/test/readline/test_readline.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36126) +++ ChangeLog (revision 36127) @@ -1,3 +1,8 @@ +Tue Jun 19 11:43:16 2012 NARUSE, Yui <naruse@r...> + + * ext/readline/readline.c (readline_getc): fix editline compatibility + broken by r36123. [Bug #6601] + Mon Jun 18 17:10:08 2012 Nobuyoshi Nakada <nobu@r...> * string.c (rb_str_subpos): split from rb_str_substr. returns Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 36126) +++ ext/readline/readline.c (revision 36127) @@ -174,6 +174,7 @@ #endif c = rb_io_getbyte(readline_instream); if (NIL_P(c)) return EOF; +#ifdef ESC if (c == INT2FIX(ESC) && RL_ISSTATE(RL_STATE_ISEARCH) && /* isn't needed in other states? */ rb_io_read_pending(ifp)) { @@ -184,6 +185,7 @@ if (meta) rl_execute_next(ESC); return ESC; } +#endif return FIX2INT(c); } #elif defined HAVE_RL_EVENT_HOOK Index: test/readline/test_readline.rb =================================================================== --- test/readline/test_readline.rb (revision 36126) +++ test/readline/test_readline.rb (revision 36127) @@ -412,7 +412,7 @@ wo.close with_pipe {|r, w| w.write("\C-a\C-k\n")} # clear line_buffer Readline::HISTORY.clear - end + end if !/EditLine/n.match(Readline::VERSION) private -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/