Method: Debugger::VarConstantCommand#execute
- Defined in:
- lib/ruby-debug/commands/variables.rb
#execute ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ruby-debug/commands/variables.rb', line 59 def execute obj = debug_eval(@match.post_match) if obj.kind_of? Module constants = debug_eval("#{@match.post_match}.constants") constants.sort! for c in constants next if c =~ /SCRIPT/ value = obj.const_get(c) rescue "ERROR: #{$!}" print " %s => %p\n", c, value end else print "Should be Class/Module: %s\n", @match.post_match end end |