diff options
Diffstat (limited to 'lib/irb/history.rb')
-rw-r--r-- | lib/irb/history.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/irb/history.rb b/lib/irb/history.rb index 25fa71b9c3..0beff15539 100644 --- a/lib/irb/history.rb +++ b/lib/irb/history.rb @@ -2,9 +2,13 @@ require "pathname" module IRB module History + DEFAULT_ENTRY_LIMIT = 1000 + class << self # Integer representation of <code>IRB.conf[:HISTORY_FILE]</code>. def save_history + return 0 if IRB.conf[:SAVE_HISTORY] == false + return DEFAULT_ENTRY_LIMIT if IRB.conf[:SAVE_HISTORY] == true IRB.conf[:SAVE_HISTORY].to_i end |