Sha256: 4e8d0b9bcb51e110a303aa0c08812bc67eb63f8dbbff7e578abc7c1eb9881556
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
# -*- coding: utf-8 -*- # Copyright (C) 2010-2011, 2015 Rocky Bernstein <rockyb@rubyforge.net> require_relative '../command' class Trepan::Command::PrCommand < Trepan::Command unless defined?(HELP) NAME = File.basename(__FILE__, '.rb') HELP = <<-HELP **#{NAME}** *ruby-expression* Print the value of the *expression*. Variables accessible are those of the environment of the selected stack frame, plus globals. If the length output string large, the first part of the value is shown and "..." indicates it has been truncated. See also: --------- `set max string` to change the string truncation limit. HELP # ALIASES = %w(p) CATEGORY = 'data' SHORT_HELP = 'print expression truncating long output' end def run(args) @proc.eval_code(@proc.cmd_argstr, @proc.settings[:maxstring]) end end if __FILE__ == $0 require_relative '../mock' dbgr, cmd = MockDebugger::setup arg_str = '1 + 2' cmd.proc.instance_variable_set('@cmd_argstr', arg_str) cmd.run([cmd.name, arg_str]) cmdproc = dbgr.core.processor cmds = dbgr.core.processor.commands end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
trepanning-2.15.35 | processor/command/pr.rb |
trepanning-1.93.35 | processor/command/pr.rb |
trepanning-2.15.33 | processor/command/pr.rb |
trepanning-1.93.32 | processor/command/pr.rb |