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

ruby-changes:67335

From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:31:19 +0900 (JST)
Subject: [ruby-changes:67335] 3d757ba1b6 (master): [ruby/reline] Suppress crashes on nil

https://git.ruby-lang.org/ruby.git/commit/?id=3d757ba1b6

From 3d757ba1b6acc624c56704d90747cb2814c22119 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Sat, 28 Aug 2021 02:15:27 +0900
Subject: [ruby/reline] Suppress crashes on nil

https://github.com/ruby/reline/commit/b5f62c366b
---
 lib/reline/line_editor.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 3eb6133..5f39b74 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -740,6 +740,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L740
       visual_lines.concat(vl)
     }
     visual_lines_under_dialog = visual_lines[visual_start, dialog.contents.size]
+    visual_lines_under_dialog = [] if visual_lines_under_dialog.nil?
     Reline::IOGate.hide_cursor
     move_cursor_down(dialog.vertical_offset)
     dialog_vertical_size = dialog.contents.size
-- 
cgit v1.1


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

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