Methods
B
N
S
T
Constants
INIT_STACK_TIMES = 3
 
CALL_STACK_OFFSET = 3
 
Class Public methods
bottom(n = 0)

singleton functions

# File ../ruby/lib/irb/frame.rb, line 49
def Frame.bottom(n = 0)
  @backtrace.bottom(n)
end
new()
# File ../ruby/lib/irb/frame.rb, line 23
def initialize
  @frames = [TOPLEVEL_BINDING] * INIT_STACK_TIMES
end
sender()
# File ../ruby/lib/irb/frame.rb, line 57
def Frame.sender
  eval "self", @backtrace.top
end
top(n = 0)
# File ../ruby/lib/irb/frame.rb, line 53
def Frame.top(n = 0)
  @backtrace.top(n)
end
Instance Public methods
bottom(n = 0)
# File ../ruby/lib/irb/frame.rb, line 42
def bottom(n = 0)
  bind = @frames[n]
  Fail FrameOverflow unless bind
  bind
end
top(n = 0)
# File ../ruby/lib/irb/frame.rb, line 36
def top(n = 0)
  bind = @frames[-(n + CALL_STACK_OFFSET)]
  Fail FrameUnderflow unless bind
  bind
end
trace_func(event, file, line, id, binding)
# File ../ruby/lib/irb/frame.rb, line 27
def trace_func(event, file, line, id, binding)
  case event
  when 'call', 'class'
    @frames.push binding
  when 'return', 'end'
    @frames.pop
  end
end