aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/ext/history.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/ext/history.rb')
-rw-r--r--lib/irb/ext/history.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/irb/ext/history.rb b/lib/irb/ext/history.rb
index 1495f9eb14..4d036e7cf0 100644
--- a/lib/irb/ext/history.rb
+++ b/lib/irb/ext/history.rb
@@ -9,7 +9,7 @@
#
#
-module IRB
+module IRB # :nodoc:
class Context
@@ -29,7 +29,17 @@ module IRB
@last_value
end
+ # The command result history limit.
attr_reader :eval_history
+ # Sets command result history limit.
+ #
+ # +no+ is an Integer or +nil+.
+ #
+ # Returns +no+ of history items if greater than 0.
+ #
+ # If +no+ is 0, the number of history items is unlimited.
+ #
+ # If +no+ is +nil+, execution result history isn't used (default).
def eval_history=(no)
if no
if defined?(@eval_history) && @eval_history