free_mutant/lib/mutant/mutator/node/super.rb

32 lines
558 B
Ruby
Raw Normal View History

2013-01-01 23:28:21 +01:00
module Mutant
class Mutator
class Node
2013-07-23 00:58:16 -07:00
# Mutator for super with parentheses
2013-01-01 23:28:21 +01:00
class Super < self
handle(:super)
2013-01-01 23:28:21 +01:00
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
emit_singletons
emit(N_ZSUPER)
emit(N_EMPTY_SUPER)
2013-06-14 19:55:44 +02:00
children.each_index do |index|
mutate_child(index)
delete_child(index)
end
2013-01-01 23:28:21 +01:00
end
end # Super
end # Node
end # Mutator
end # Mutant