rubyjruby

irb keeps saving history, even though turned off via IRB configuration


I have in my .irbrc the statements

IRB.conf[:SAVE_HISTORY] = nil
IRB.conf[:EVAL_HISTORY] = nil

but irb still creates a history file. Do I need to set something else?

UPDATE: On request, this is the effective command used to run irb (pathes shortened):

export IRBRC=/path/to/irbrc_for_testing.rb
java -Xmx4G -cp /path/to/org/jruby/jruby-complete/1.7.27/jruby-complete-1.7.27.jar org.jruby.Main /path/to/bin/jirb_swing_ex

The files jruby-complete-1.7.27.jar and jirb_swing_ex were downloaded from the JRuby web site.

The file irbrc_for_testing.rb contains the IRB.conf settings.


Solution

  • I found a solution:

    My irb setup file (i.e. the one which configures IRB.conf) performs at the end the command load(user_irbrc), where the variable user_irbrc (by some unfortunate circumstances) pointed to a certain irbrc setup file put in place by the rbenv version manager (which I used some times ago for switching between MRI rubies). It seems that this rbenv irbrc was responsible for putting back IRB.conf[:SAVE_HISTORY] to the value of 100.

    After I fixed that undesired load command, history saving is turned off.