lib/rbkb/cli.rb in rbkb-0.6.12 vs lib/rbkb/cli.rb in rbkb-0.7.0

- old
+ new

@@ -1,6 +1,7 @@ require 'rbkb' +require 'rbkb/extends' require 'optparse' # Copyright 2009 emonti at matasano.com # See README.rdoc for license information # @@ -149,11 +150,11 @@ "Start and optional end range") do |r| raise "-x and -r are mutually exclusive" if @parser_got_range @parser_got_range=true - unless m=/^(-?[0-9]+)(?::(-?[0-9]+))?$/.match(r) + unless /^(-?[0-9]+)(?::(-?[0-9]+))?$/.match(r) raise "invalid range #{r.inspect}" end @opts[fkey] = $1.to_i @opts[lkey] = $2.to_i if $2 @@ -163,10 +164,10 @@ "Start and optional end range in hex") do |r| raise "-x and -r are mutually exclusive" if @parser_got_range @parser_got_range=true - unless m=/^(-?[0-9a-f]+)(?::(-?[0-9a-f]+))?$/i.match(r) + unless /^(-?[0-9a-f]+)(?::(-?[0-9a-f]+))?$/i.match(r) raise "invalid range #{r.inspect}" end @opts[fkey] = if ($1[0,1] == '-')