diff --git a/ChangeLog b/ChangeLog index 1db9daa38c..87119c9381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 21 15:01:35 2009 NARUSE, Yui + + * ext/readline/readline.c (readline_readline): use rb_prep_terminal + only on Windows. + Fri Aug 21 07:25:45 2009 Nobuyoshi Nakada * lib/rdoc/ri/gemdirs.rb: split from lib/rdoc/ri/paths.rb to ge diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 25b8013177..abb9a0a33a 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -144,7 +144,6 @@ readline_event(void) static VALUE readline_get(VALUE prompt) { - rl_prep_terminal(1); return (VALUE)readline((char *)prompt); } @@ -250,6 +249,9 @@ readline_readline(int argc, VALUE *argv, VALUE self) 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