Class: Debugger::FinishCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::FinishCommand
show all
- Defined in:
- lib/ruby-debug/commands/stepping.rb
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
69
70
71
72
73
|
# File 'lib/ruby-debug/commands/stepping.rb', line 69
def help(cmd)
%{
fin[ish]\treturn to outer frame
}
end
|
.help_command ⇒ Object
65
66
67
|
# File 'lib/ruby-debug/commands/stepping.rb', line 65
def help_command
'finish'
end
|
Instance Method Details
#execute ⇒ Object
54
55
56
57
58
59
60
61
62
|
# File 'lib/ruby-debug/commands/stepping.rb', line 54
def execute
if @state.frame_pos == @state.context.frames.size
print "\"finish\" not meaningful in the outermost frame.\n"
else
@state.context.stop_frame = @state.context.frames.size - @state.frame_pos
@state.frame_pos = 0
@state.proceed
end
end
|
#regexp ⇒ Object
50
51
52
|
# File 'lib/ruby-debug/commands/stepping.rb', line 50
def regexp
/^\s*fin(?:ish)?$/
end
|