Skip to content

Commit

Permalink
Define RelineInputMethod::HISTORY
Browse files Browse the repository at this point in the 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.
  • Loading branch information
st0012 committed Jul 13, 2023
1 parent 3ac96be commit 9e2bc35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/irb/input-method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e2bc35

Please sign in to comment.