From 1105d2c6ce9760925c35d14857771351959f9dc3 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 27 Jul 2013 20:21:27 +0200 Subject: [PATCH] Fix rubocop warnings in Mutant::Mutator namespace --- lib/mutant/mutator/node.rb | 2 +- lib/mutant/mutator/node/connective/binary.rb | 2 +- lib/mutant/mutator/node/named_value/variable_assignment.rb | 2 +- lib/mutant/mutator/registry.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/mutant/mutator/node.rb b/lib/mutant/mutator/node.rb index 95904bd2..7ded8853 100644 --- a/lib/mutant/mutator/node.rb +++ b/lib/mutant/mutator/node.rb @@ -154,7 +154,7 @@ module Mutant # def emit_child_update(index, node) new_children = children.dup - new_children[index]=node + new_children[index] = node emit_self(*new_children) end diff --git a/lib/mutant/mutator/node/connective/binary.rb b/lib/mutant/mutator/node/connective/binary.rb index 44b17360..62b5161e 100644 --- a/lib/mutant/mutator/node/connective/binary.rb +++ b/lib/mutant/mutator/node/connective/binary.rb @@ -11,7 +11,7 @@ module Mutant :or => :and, }.freeze - handle *INVERSE.keys + handle(*INVERSE.keys) children :left, :right diff --git a/lib/mutant/mutator/node/named_value/variable_assignment.rb b/lib/mutant/mutator/node/named_value/variable_assignment.rb index 60f3dd46..ad9d0478 100644 --- a/lib/mutant/mutator/node/named_value/variable_assignment.rb +++ b/lib/mutant/mutator/node/named_value/variable_assignment.rb @@ -15,7 +15,7 @@ module Mutant :lvasgn => '' ) - handle *MAP.keys + handle(*MAP.keys) private diff --git a/lib/mutant/mutator/registry.rb b/lib/mutant/mutator/registry.rb index 7dfedd09..157a576b 100644 --- a/lib/mutant/mutator/registry.rb +++ b/lib/mutant/mutator/registry.rb @@ -24,7 +24,7 @@ module Mutant # def self.register(type, mutator_class) raise "duplicate type registration: #{type}" if registry.key?(type) - registry[type]=mutator_class + registry[type] = mutator_class self end @@ -42,7 +42,7 @@ module Mutant def self.lookup(node) type = node.type registry.fetch(type) do - raise ArgumentError,"No mutator to handle: #{type.inspect}" + raise ArgumentError, "No mutator to handle: #{type.inspect}" end end