processor/command/disable.rb in rb8-trepanning-0.1.3 vs processor/command/disable.rb in rb8-trepanning-0.1.4

- old
+ new

@@ -1,33 +1,32 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net> +# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net> require 'rubygems'; require 'require_relative' -require_relative 'base/cmd' +require_relative '../command' # require_relative '../breakpoint' # require_relative '../../app/breakpoint' # disable breakpoint command. The difference however is that the # parameter to @proc.en_disable_breakpoint_by_number is different (set # as ENABLE_PARM below). # # NOTE: The enable command subclasses this, so beware when changing! class Trepan::Command::DisableCommand < Trepan::Command - # Silence already initialized constant .. warnings - old_verbose = $VERBOSE - $VERBOSE = nil - NAME = File.basename(__FILE__, '.rb') - HELP = <<-HELP -#{NAME} bpnumber [bpnumber ...] + Trepan::Util.suppress_warnings { + NAME = File.basename(__FILE__, '.rb') + HELP = <<-HELP +#{NAME} NUM1 [NUM2 ...] -Disables the breakpoints given as a space separated list of breakpoint -numbers. See also "info break" to get a list. +Disables the breakpoints given as a space-separated list of +numbers. + +See also "enable" and "info break". HELP - CATEGORY = 'breakpoints' - SHORT_HELP = 'Disable some breakpoints' - - $VERBOSE = old_verbose + CATEGORY = 'breakpoints' + SHORT_HELP = 'Disable some breakpoints' + } def initialize(proc) super @enable_parm = false # true if enable end