Skip to content

Commit 9a5da2d

Browse files
committed
[ruby/readline-ext] Initialize libedit before managing the history
Fixes https://bugs.ruby-lang.org/issues/17629 ruby/readline-ext@250d6787ed
1 parent 9110021 commit 9a5da2d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/readline/readline.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,7 @@ Init_readline(void)
20882088
#if defined HAVE_CLEAR_HISTORY || defined HAVE_REMOVE_HISTORY
20892089
if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION,
20902090
strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
2091+
prepare_readline();
20912092
add_history("1");
20922093
if (history_get(history_get_offset_func(0)) == NULL) {
20932094
history_get_offset_func = history_get_offset_0;

0 commit comments

Comments
 (0)