[前][次][番号順一覧][スレッド一覧]

ruby-changes:65287

From: Nobuyoshi <ko1@a...>
Date: Thu, 18 Feb 2021 21:19:30 +0900 (JST)
Subject: [ruby-changes:65287] 9a5da2dcff (master): [ruby/readline-ext] Initialize libedit before managing the history

https://git.ruby-lang.org/ruby.git/commit/?id=9a5da2dcff

From 9a5da2dcff51dfd845246cc21645369d1f7201c8 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 18 Feb 2021 20:49:45 +0900
Subject: [ruby/readline-ext] Initialize libedit before managing the history

Fixes https://bugs.ruby-lang.org/issues/17629

https://github.com/ruby/readline-ext/commit/250d6787ed
---
 ext/readline/readline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 9f76f90..b804ae6 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -2088,6 +2088,7 @@ Init_readline(void) https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c#L2088
 #if defined HAVE_CLEAR_HISTORY || defined HAVE_REMOVE_HISTORY
     if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION,
                 strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
+        prepare_readline();
         add_history("1");
         if (history_get(history_get_offset_func(0)) == NULL) {
             history_get_offset_func = history_get_offset_0;
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]