Class: Debugger::FinishCommand

### Home Classes Methods

### In Files

- lib/ruby-debug/commands/finish.rb

### Parent

Debugger::Command

### Methods

- ::help
- ::help_command
- #execute
- #regexp

### Class/Module Index

Quicksearch

- Debugger
- Debugger::AddBreakpoint
- Debugger::Breakpoint
- Debugger::Context
- Debugger::ContinueCommand
- Debugger::DeleteBreakpointCommand
- Debugger::FinishCommand
- Debugger::HelpCommand
- Debugger::IRBCommand
- Debugger::InfoCommand
- Debugger::JumpCommand
- Debugger::KillCommand
- Debugger::ListCommand
- Debugger::LocalInterface
- Debugger::LocalInterface::Debugger
- Debugger::MethodCommand
- Debugger::MethodSigCommand
- Debugger::NextCommand
- Debugger::ParseFunctions
- Debugger::Processor
- Debugger::QuitCommand
- Debugger::ReloadCommand
- Debugger::SetCommand
- Debugger::ShowCommand
- Debugger::SkipCommand
- Debugger::SourceCommand
- Debugger::StepCommand
- Debugger::VarClassVarCommand
- Debugger::VarInheritCommand
- Debugger::VarLocalCommand
- Debugger::WhereCommand
- Printers
- Printers::Base
- Printers::Base::MissedArgument
- Printers::Base::MissedPath
- Printers::Plain
- Mocha
- Mocha::Call
- Mocha::Expectation
- Mocha::Mock
- MiniTest
- MiniTest::Assertions
- MiniTest::Expectations
- TestDsl
- TestDsl::ClassMethods
- TestDsl::Shared
- Kernel
- Module
- PrinterHelpers
- TestInterface

No matching classes.

# Debugger::FinishCommand

Implements the debugger 'finish' command.

### Public Class Methods

help(cmd) click to toggle source

    # File lib/ruby-debug/commands/finish.rb, line 29
          def help(cmd)
            %{
              fin[ish] [frame-number]\tExecute until selected stack frame returns.

    If no frame number is given, we run until the currently selected frame
    returns.  The currently selected frame starts out the most-recent
    frame or 0 if no frame positioning (e.g "up", "down" or "frame") has
    been performed. If a frame number is given we run until that frame
    returns.
            }
          end

help_command() click to toggle source

    # File lib/ruby-debug/commands/finish.rb, line 25
    def help_command
      'finish'
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/ruby-debug/commands/finish.rb, line 11
    def execute
      max_frame = @state.context.stack_size - @state.frame_pos
      if !@match[1] or @match[1].empty?
        frame_pos = @state.frame_pos
      else
        frame_pos = get_int(@match[1], "Finish", 0, max_frame-1, 0)
        return nil unless frame_pos
      end
      @state.context.stop_frame = frame_pos
      @state.frame_pos = 0
      @state.proceed
    end

regexp() click to toggle source

    # File lib/ruby-debug/commands/finish.rb, line 7
    def regexp
      /^\s*fin(?:ish)? (?:\s+(.*))?$/
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.