From d597d7a8b6e753cfe40b8470c770f744adde5d4f Mon Sep 17 00:00:00 2001 From: Yale Kozinski Date: Mon, 23 Nov 2020 01:17:06 -0800 Subject: [PATCH] Fixing glitchy kill ring behavior in irb See https://github.com/ruby/irb/issues/85 for details --- 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 df4903c9c4..65878fe9f3 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -183,7 +183,7 @@ class Reline::LineEditor @cleared = false @rerender_all = false @history_pointer = nil - @kill_ring = Reline::KillRing.new + @kill_ring ||= Reline::KillRing.new @vi_clipboard = '' @vi_arg = nil @waiting_proc = nil