Fix util array mutator to not modify frozen input
This commit is contained in:
parent
2d9da54041
commit
5e1c6e72a3
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue