Implements the debugger 'var local' command.
# File cli/ruby-debug/commands/variables.rb, line 151 def help(cmd) %Q{ v[ar] l[ocal]\t\t\tshow local variables } end
# File cli/ruby-debug/commands/variables.rb, line 147 def help_command 'var' end
# File cli/ruby-debug/commands/variables.rb, line 138 def execute locals = @state.context.frame_locals(@state.frame_pos) _self = @state.context.frame_self(@state.frame_pos) locals.keys.sort.each do |name| print " %s => %p\n", name, locals[name] end end
# File cli/ruby-debug/commands/variables.rb, line 134 def regexp %r^\s*v(?:ar)?\s+l(?:ocal)?\s*$/ end