From 9e2bc3525057639f73402f393d295098a888e1fa Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 14 Jul 2023 00:41:51 +0100 Subject: [PATCH] Define RelineInputMethod::HISTORY The HistorySavingAbility module doesn't do anything if the input method class doesn't define HISTORY. - https://github.com/ruby/irb/blob/3ac96be660bf052902fb4e532c7a46cf294b71eb/lib/irb/history.rb#L10 - https://github.com/ruby/irb/blob/3ac96be660bf052902fb4e532c7a46cf294b71eb/lib/irb/history.rb#L34 This patch defines RelineInputMethod::HISTORY to avoid this. --- lib/irb/input-method.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index cd1f5ef5d..a134574c2 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -255,6 +255,7 @@ def inspect end class RelineInputMethod < InputMethod + HISTORY = Reline::HISTORY # Creates a new input method object using Reline def initialize IRB.__send__(:set_encoding, Reline.encoding_system_needs.name, override: false)