Fix rubocop warnings in Mutant::Mutator namespace
This commit is contained in:
parent
6d61420286
commit
1105d2c6ce
4 changed files with 5 additions and 5 deletions
|
@ -154,7 +154,7 @@ module Mutant
|
||||||
#
|
#
|
||||||
def emit_child_update(index, node)
|
def emit_child_update(index, node)
|
||||||
new_children = children.dup
|
new_children = children.dup
|
||||||
new_children[index]=node
|
new_children[index] = node
|
||||||
emit_self(*new_children)
|
emit_self(*new_children)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ module Mutant
|
||||||
:or => :and,
|
:or => :and,
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
handle *INVERSE.keys
|
handle(*INVERSE.keys)
|
||||||
|
|
||||||
children :left, :right
|
children :left, :right
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ module Mutant
|
||||||
:lvasgn => ''
|
:lvasgn => ''
|
||||||
)
|
)
|
||||||
|
|
||||||
handle *MAP.keys
|
handle(*MAP.keys)
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ module Mutant
|
||||||
#
|
#
|
||||||
def self.register(type, mutator_class)
|
def self.register(type, mutator_class)
|
||||||
raise "duplicate type registration: #{type}" if registry.key?(type)
|
raise "duplicate type registration: #{type}" if registry.key?(type)
|
||||||
registry[type]=mutator_class
|
registry[type] = mutator_class
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ module Mutant
|
||||||
def self.lookup(node)
|
def self.lookup(node)
|
||||||
type = node.type
|
type = node.type
|
||||||
registry.fetch(type) do
|
registry.fetch(type) do
|
||||||
raise ArgumentError,"No mutator to handle: #{type.inspect}"
|
raise ArgumentError, "No mutator to handle: #{type.inspect}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue