Class: Debugger::ThreadResumeCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/threads.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



135
136
137
138
139
# File 'lib/ruby-debug/commands/threads.rb', line 135

def help(cmd)
  %{
    th[read] resume <nnn>\t\tresume thread nnn
  }
end

.help_commandObject



131
132
133
# File 'lib/ruby-debug/commands/threads.rb', line 131

def help_command
  'thread'
end

Instance Method Details

#executeObject



119
120
121
122
123
124
125
126
127
128
# File 'lib/ruby-debug/commands/threads.rb', line 119

def execute
  c = parse_thread_num_for_cmd("thread resume", @match[1])
  return unless c 
  if !c.thread.stop?
    errmsg pr("thread.errors.already_running")
    return
  end
  c.resume
  display_context(c)
end

#regexpObject



115
116
117
# File 'lib/ruby-debug/commands/threads.rb', line 115

def regexp
  /^\s*th(?:read)?\s+resume\s*(\S*)\s*$/
end