From 43620a5f02f709a7d970b55cbec973b3bcbab35c Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Mon, 17 Jul 2023 04:55:41 +0900 Subject: [PATCH] Fix [nil] is passed to auto_indent_proc when exit with CTRL+d Fix it https://github.com/ruby/reline/issues/556 --- lib/reline/line_editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 7ad56a39f8..2c46b5cb71 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1849,7 +1849,7 @@ def byte_pointer=(val) def whole_lines index = @previous_line_index || @line_index temp_lines = @buffer_of_lines.dup - temp_lines[index] = @line + temp_lines[index] = @line || "" temp_lines end