lib/mutant/mutator/node.rb in mutant-0.8.24 vs lib/mutant/mutator/node.rb in mutant-0.9.0

- old
+ new

@@ -42,17 +42,10 @@ # Duplicate of original # # @return [Parser::AST::Node] alias_method :dup_node, :dup_input - # Original nodes children - # - # @return [Array<Parser::AST::Node>] - def children - node.children - end - # Dispatch on child index # # @param [Integer] index # # @return [undefined] @@ -120,11 +113,11 @@ # Emit a literal nil # # @return [undefined] def emit_nil - emit(N_NIL) unless asgn_left? + emit(N_NIL) unless left_assignment? end # Parent node # # @return [Parser::AST::Node] node @@ -148,10 +141,10 @@ end # Test if the node is the left of an or_asgn or op_asgn # # @return [Boolean] - def asgn_left? + def left_assignment? AST::Types::OP_ASSIGN.include?(parent_type) && parent.node.children.first.equal?(node) end # Children indices #