From ccb9c14af751e7c1cd02d71fcb6b8421ca2928ff Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 2 May 2015 22:01:10 +0000 Subject: [PATCH] Kill alive mutations in Mutant::CLI --- config/flay.yml | 2 +- lib/mutant/cli.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/flay.yml b/config/flay.yml index 32453e6b..2931f4dc 100644 --- a/config/flay.yml +++ b/config/flay.yml @@ -1,3 +1,3 @@ --- threshold: 18 -total_score: 1215 +total_score: 1218 diff --git a/lib/mutant/cli.rb b/lib/mutant/cli.rb index 9528e281..25325b4e 100644 --- a/lib/mutant/cli.rb +++ b/lib/mutant/cli.rb @@ -66,13 +66,13 @@ module Mutant opts = OptionParser.new do |builder| builder.banner = 'usage: mutant [options] MATCH_EXPRESSION ...' %w[add_environment_options add_mutation_options add_filter_options add_debug_options].each do |name| - send(name, builder) + __send__(name, builder) end end parse_match_expressions(opts.parse!(arguments)) rescue OptionParser::ParseError => error - raise(Error, error.message, error.backtrace) + raise(Error, error) end # Parse matchers @@ -140,7 +140,7 @@ module Mutant # @api private # def add_mutation_options(opts) - opts.separator(EMPTY_STRING) + opts.separator(nil) opts.separator('Options:') opts.on('--score COVERAGE', 'Fail unless COVERAGE is not reached exactly') do |coverage| @@ -179,7 +179,7 @@ module Mutant update(fail_fast: true) end opts.on('--version', 'Print mutants version') do - puts("mutant-#{Mutant::VERSION}") + puts("mutant-#{VERSION}") Kernel.exit(EXIT_SUCCESS) end opts.on('-d', '--debug', 'Enable debugging output') do