summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-24 06:55:26 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-24 06:55:26 +0000
commit77146ae7cb6f6a5c7b081c93476ba9918d9a08c5 (patch)
treef89b8d79ad962fd9e749e1c16091045b4a03e61d
parentb8b993c182f82294bdef30d2939f551e04ca526f (diff)
* ext/readline/readline.c (readline_readline): rl_deprep_term_function
may be NULL with libedit. reported by Ryan Davis. [ruby-dev:29070] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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