Stop treating history-saving logic as extension#613
Conversation
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.
(ruby/irb#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.
|
I have this in my ~/.irbrc: require 'irb/completion'
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 1000On Ruby 3.3.0, now There is no issue on Ruby < 3.3, e.g. it works fine on Ruby 3.2.2 (with the irb shipped with that Ruby release). What is a good solution to ensure history is enabled both on 3.3.0 (where it's default) and on older versions? Maybe I just remove the last 2 lines? Since when is SAVE_HISTORY 1000 by default? |
|
I think this is similar to #804 Since as early as IRB 0.9.6,
Yeah you can remove it as it's required by default since Ruby 2.7 (IRB 1.2.6) |
weird one to track down, but: ruby/irb#613
ruby/irb#613 (comment) Also adjust save history limit to 1000.
weird one to track down, but: ruby/irb#613
weird one to track down, but: ruby/irb#613
weird one to track down, but: ruby/irb#613
weird one to track down, but: ruby/irb#613
weird one to track down, but: ruby/irb#613
weird one to track down, but: ruby/irb#613
weird one to track down, but: ruby/irb#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.(I plan to rename
ext/historytoext/eval_historylater as it's a different feature)