summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYale Kozinski <ytk@kozinski.com>2020-11-23 01:17:06 -0800
committeraycabta <aycabta@gmail.com>2020-12-17 20:04:42 +0900
commitd597d7a8b6e753cfe40b8470c770f744adde5d4f (patch)
tree4086d2eb5f9f2d3cea0e7cb9bfa8e96321472b9e
parentda3438a50454706cce2e5b06bdad498b42977f8f (diff)
Fixing glitchy kill ring behavior in irb
See https://github.com/ruby/irb/issues/85 for details
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3806
-rw-r--r--lib/reline/line_editor.rb2
1 files changed, 1 insertions, 1 deletions
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