diff options
author | Stan Lo <[email protected]> | 2023-07-14 16:45:04 +0100 |
---|---|---|
committer | git <[email protected]> | 2023-07-14 15:45:09 +0000 |
commit | 174bc2257065785efbbefca797a50f0847bb6062 (patch) | |
tree | e74c9d73c61cb645fe0ea6faba660e4b1b0b85a1 /lib/irb/xmp.rb | |
parent | bc8cc68aeff7ae3be1353f4077633cda4d30b54b (diff) |
[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.
- 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.
* 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
Diffstat (limited to 'lib/irb/xmp.rb')
0 files changed, 0 insertions, 0 deletions