diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-24 06:55:26 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-24 06:55:26 +0000 |
commit | e1dfa8740dbecdbc88dcd7640e6b2f36ddca4ebd (patch) | |
tree | 3b2fa2345f7c3e7620c1548b29af4d97ecabe6b8 | |
parent | 62272bedf50c758ba15666e019953d6654f46611 (diff) | |
download | ruby-e1dfa8740dbecdbc88dcd7640e6b2f36ddca4ebd.tar.gz |
* 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/branches/ruby_1_8@10589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/readline/readline.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -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] + Mon Jul 24 15:19:55 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * eval.c (rb_call0): revert last change. [ruby-dev:29112] diff --git a/ext/readline/readline.c b/ext/readline/readline.c index aa481ad719..af7e029d1c 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -83,7 +83,9 @@ readline_readline(argc, argv, 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 |