class IRB::Frame
def bottom(n = 0)
initialized.
Returns the +n+ number of frames on the call stack from the first frame
def bottom(n = 0) bind = @frames[n] fail FrameOverflow unless bind bind end
def initialize
def initialize @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES end
def top(n = 0)
initialized.
Returns the +n+ number of frames on the call stack from the last frame
def top(n = 0) bind = @frames[-(n + CALL_STACK_OFFSET)] fail FrameUnderflow unless bind bind end
def trace_func(event, file, line, id, binding)
def trace_func(event, file, line, id, binding) case event when 'call', 'class' @frames.push binding when 'return', 'end' @frames.pop end end