e93960ca35
* Mutant prevents double emits via guarding on source representation of partial AST nodes. Not all AST nodes are valid as roots, so this change creates a valid root around an leave. * Over the time multiple of these situartions must be solved, we'll end up in a more deduplicated solution. * Closes: #165
26 lines
464 B
Ruby
26 lines
464 B
Ruby
# encoding: utf-8
|
|
|
|
module Mutant
|
|
class Mutator
|
|
class Node
|
|
# Mutator for rescue nodes
|
|
class Rescue < Generic
|
|
|
|
handle :rescue
|
|
|
|
# Return identity
|
|
#
|
|
# @param [Parser::AST::Node] node
|
|
#
|
|
# @return [String]
|
|
#
|
|
# @api private
|
|
#
|
|
def self.identity(node)
|
|
super(NodeHelpers.s(:kwbegin, node))
|
|
end
|
|
|
|
end # Rescue
|
|
end # Node
|
|
end # Mutator
|
|
end # Mutant
|