module IRuby::History
Public Instance Methods
Source
# File lib/iruby/backend.rb, line 10 def eval(code, store_history) b = eval_binding b.local_variable_set(:_ih, In) unless b.local_variable_defined?(:_ih) b.local_variable_set(:_oh, Out) unless b.local_variable_defined?(:_oh) out = super # TODO Add IRuby.cache_size which controls the size of the Out array # and sets the oldest entries and _<n> variables to nil. if store_history b.local_variable_set("_#{Out.size}", out) b.local_variable_set("_i#{In.size}", code) Out << out In << code b.local_variable_set(:___, Out[-3]) b.local_variable_set(:__, Out[-2]) b.local_variable_set(:_, Out[-1]) b.local_variable_set(:_iii, In[-3]) b.local_variable_set(:_ii, In[-2]) b.local_variable_set(:_i, In[-1]) end out end
Calls superclass method