Fix remaniung rubocop issues in Mutator::Node

This commit is contained in:
Markus Schirp 2013-07-27 21:14:41 +02:00
parent 46c79e5815
commit 636e189b06
6 changed files with 7 additions and 6 deletions

View file

@ -30,7 +30,7 @@ module Mutant
# @api private
#
def emit_when_mutations
indices = children.each_index.drop(1).take(children.length-2)
indices = children.each_index.drop(1).take(children.length - 2)
one = indices.one?
indices.each do |index|
mutate_child(index)

View file

@ -28,7 +28,7 @@ module Mutant
# @api private
#
def values
[0, 1, -value, value+1, value-1]
[0, 1, -value, value + 1, value - 1]
end
# Return value

View file

@ -48,7 +48,6 @@ module Mutant
# @api private
#
def emit_end_mutations
#emit_self(negative_infinity, finish)
emit_self(NAN, _end)
end

View file

@ -7,6 +7,8 @@ module Mutant
handle(:sym)
PREFIX = 's'
private
# Emit mutatns
@ -17,7 +19,7 @@ module Mutant
#
def dispatch
emit_nil
emit_new { new_self(('s'+Random.hex_string).to_sym) }
emit_new { new_self((PREFIX + Random.hex_string).to_sym) }
end
end # Symbol

View file

@ -41,7 +41,7 @@ module Mutant
# @api private
#
def mutate_body
mutate_child(children.length-1)
mutate_child(children.length - 1)
end
end # When

View file

@ -43,7 +43,7 @@ module Mutant
input.each_with_index do |element, index|
Mutator.each(element).each do |mutation|
dup = dup_input
dup[index]=mutation
dup[index] = mutation
emit(dup)
end
end