Method: Debugger::VarConstantCommand#execute
- Defined in:
- lib/ruby-debug/commands/variables.rb
#execute ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/ruby-debug/commands/variables.rb', line 62 def execute obj = debug_eval(@match.post_match) if obj.kind_of? Module constants = debug_eval("#{@match.post_match}.constants").sort.reject { |c| c =~ /SCRIPT/ }.map do |constant| value = obj.const_get(constant) rescue "ERROR: #{$!}" [constant, value] end print prv(constants, "constant") else errmsg pr("variable.errors.not_class_module", object: @match.post_match) end end |