Implements debugger “quit” command
# File lib/ruby-debug/commands/quit.rb, line 27 def help(cmd) %Q{ q[uit] [!|unconditionally]\texit from debugger. exit[!]\talias to quit Normally we prompt before exiting. However if the parameter "unconditionally" or is given or suffixed with !, we stop without asking further questions. } end
# File lib/ruby-debug/commands/quit.rb, line 23 def help_command %w[quit exit] end
# File lib/ruby-debug/commands/quit.rb, line 15 def execute if @match[1] or confirm("Really quit? (y/n) ") @state.interface.finalize exit! # exit -> exit!: No graceful way to stop threads... end end
# File lib/ruby-debug/commands/quit.rb, line 7 def regexp %r ^\s* (?:q(?:uit)?|exit) \s* (!|\s+unconditionally)? \s* $ /x end