Fix util array mutator to not modify frozen input

This commit is contained in:
Markus Schirp 2013-06-04 22:17:01 +02:00
parent 2d9da54041
commit 5e1c6e72a3

View file

@ -41,8 +41,8 @@ module Mutant
# #
def dispatch def dispatch
input.each_with_index do |element, index| input.each_with_index do |element, index|
dup = dup_input
Mutator.each(element).each do |mutation| Mutator.each(element).each do |mutation|
dup = dup_input
dup[index]=mutation dup[index]=mutation
emit(dup) emit(dup)
end end
@ -65,7 +65,7 @@ module Mutant
emit([]) emit([])
end end
end end # Array
end end # Node
end end # Mutant
end end # Mutator