class Rubinius::Debugger::Command::SetFrame

Public Instance Methods

run(args) click to toggle source
# File lib/rubinius/debugger/commands.rb, line 425
def run(args)
  unless m = /(\d+)/.match(args)
    error "Invalid frame number: #{args}"
    return
  end

  num = m[1].to_i

  if num >= @debugger.locations.size
    error "Frame #{num} too big"
    return
  end

  @debugger.set_frame(num)

  info current_frame.describe
  @debugger.show_code
end