Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Stan Lo 174bc22570 [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.

- 3ac96be660/lib/irb/history.rb (L10)
- 3ac96be660/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
2023-07-14 15:45:09 +00:00
Stan Lo af9eeb19d8 [ruby/irb] Stop treating history-saving logic as extension
(https://github.com/ruby/irb/pull/613)

Since `IRB.conf[:SAVE_HISTORY]` is assigned with 1000 by default, history-saving
is a feature enabled by default. So it should not be treated as an extension,
which adds unnecessary complexity to the code.
2023-07-03 13:48:23 +00:00