summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/readline/readline.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a3aef2ecae..1cb0071d72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jul 24 15:51:52 2006 Tanaka Akira <akr@fsij.org>
+
+ * ext/readline/readline.c (readline_readline): rl_deprep_term_function
+ may be NULL with libedit. reported by Ryan Davis. [ruby-dev:29070]
+
Sun Jul 23 22:59:49 2006 Tanaka Akira <akr@fsij.org>
* test/socket/test_unix.rb: disabled on cygwin.
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 626c0e0dc7..f6dc6b67ed 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -77,7 +77,9 @@ readline_readline(int argc, VALUE *argv, VALUE self)
rl_cleanup_after_signal();
#elif defined HAVE_RL_DEPREP_TERM_FUNCTION
/* restore terminal mode */
- (*rl_deprep_term_function)();
+ if (rl_deprep_term_function != NULL) /* NULL in libedit. [ruby-dev:29116] */
+ (*rl_deprep_term_function)();
+ else
#else
rl_deprep_terminal();
#endif