Project

General

Profile

« Previous | Next » 

Revision 174bc225

Added by st0012 (Stan Lo) almost 2 years ago

[ruby/irb] Fix history-saving feature
(https://github.com/ruby/irb/pull/642)

  • Define RelineInputMethod::HISTORY

The HistorySavingAbility module doesn't do anything if the input method
class doesn't define HISTORY.

This patch defines RelineInputMethod::HISTORY to avoid this.

  • Improve history-saving's ability check

Instead of checking the existence of input_method_class::HISTORY, we should
make every input method class declare if it supports history saving or not.

Since the default value is false, it shouldn't break any custom input method
that inherits from IRB::InputMethod.

https://github.com/ruby/irb/commit/aec7a5b3f5