ruby-changes:12871
From: naruse <ko1@a...>
Date: Fri, 21 Aug 2009 15:04:38 +0900 (JST)
Subject: [ruby-changes:12871] Ruby:r24604 (trunk): use rl_prep_terminal only on Windows.
naruse 2009-08-21 15:04:21 +0900 (Fri, 21 Aug 2009) New Revision: 24604 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24604 Log: use rl_prep_terminal only on Windows. [ruby-core:25009] * ext/readline/readline.c (readline_readline): use rb_prep_terminal only on Windows. Modified files: trunk/ChangeLog trunk/ext/readline/readline.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24603) +++ ChangeLog (revision 24604) @@ -1,3 +1,8 @@ +Fri Aug 21 15:01:35 2009 NARUSE, Yui <naruse@r...> + + * ext/readline/readline.c (readline_readline): use rb_prep_terminal + only on Windows. + Fri Aug 21 07:25:45 2009 Nobuyoshi Nakada <nobu@r...> * lib/rdoc/ri/gemdirs.rb: split from lib/rdoc/ri/paths.rb to ge Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 24603) +++ ext/readline/readline.c (revision 24604) @@ -144,7 +144,6 @@ static VALUE readline_get(VALUE prompt) { - rl_prep_terminal(1); return (VALUE)readline((char *)prompt); } @@ -250,6 +249,9 @@ if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "closed stdin"); +#ifdef _WIN32 + rl_prep_terminal(1); +#endif buff = (char*)rb_protect(readline_get, (VALUE)prompt, &status); if (status) { #if defined HAVE_RL_CLEANUP_AFTER_SIGNAL -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/