eval_history=(no)
public
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).
Show source
def eval_history=(no)
if no
if defined?(@eval_history) && @eval_history
@eval_history_values.size(no)
else
@eval_history_values = History.new(no)
IRB.conf[:__TMP__EHV__] = @eval_history_values
@workspace.evaluate(self, "__ = IRB.conf[:__TMP__EHV__]")
IRB.conf.delete(:__TMP_EHV__)
end
else
@eval_history_values = nil
end
@eval_history = no
end