diff options
author | aycabta <aycabta@gmail.com> | 2019-07-15 01:16:18 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-07-15 01:16:18 +0900 |
commit | 078e50c5e9c53d935bdea6ca3ae156c0edcea467 (patch) | |
tree | f61420aa72fd13d85bd38887efc38a5b4f9eed74 | |
parent | 6d573691058b353840c504d16cc2df1eb0bb517c (diff) | |
download | ruby-078e50c5e9c53d935bdea6ca3ae156c0edcea467.tar.gz |
Save history in IRB is enabled by default
-rw-r--r-- | lib/irb.rb | 9 | ||||
-rw-r--r-- | lib/irb/init.rb | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index e0e4b1a155..2b00de9f62 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -122,13 +122,12 @@ require "irb/version" # # === History # -# By default, irb disables history and will not store any commands you used. +# By default, irb will store the last 1000 commands you used in +# <code>~/.irb_history</code>. # -# If you want to enable history, add the following to your +.irbrc+: +# If you want to disable history, add the following to your +.irbrc+: # -# IRB.conf[:SAVE_HISTORY] = 1000 -# -# This will now store the last 1000 commands in <code>~/.irb_history</code>. +# IRB.conf[:SAVE_HISTORY] = nil # # See IRB::Context#save_history= for more information. # diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 5069b7bbf7..8a9215f5f9 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -54,7 +54,7 @@ module IRB # :nodoc: @CONF[:VERBOSE] = nil @CONF[:EVAL_HISTORY] = nil - @CONF[:SAVE_HISTORY] = nil + @CONF[:SAVE_HISTORY] = 1000 @CONF[:BACK_TRACE_LIMIT] = 16 |