lib/mutant/matcher/method/singleton.rb in mutant-0.5.22 vs lib/mutant/matcher/method/singleton.rb in mutant-0.5.23
- old
+ new
@@ -43,11 +43,11 @@
# @api private
#
def line?(node)
expression = node.location.expression
return false unless expression
- expression.line == source_line
+ expression.line.equal?(source_line)
end
# Test for name match
#
# @param [Parser::AST::Node] node
@@ -55,11 +55,11 @@
# @return [Boolean]
#
# @api private
#
def name?(node)
- node.children[NAME_INDEX] == method_name
+ node.children[NAME_INDEX].equal?(method_name)
end
# Test for receiver match
#
# @param [Parser::AST::Node] node
@@ -93,10 +93,10 @@
#
# @api private
#
def receiver_name?(node)
name = node.children[CONST_NAME_INDEX]
- name.to_s == context.unqualified_name
+ name.to_s.eql?(context.unqualified_name)
end
end # Singleton
end # Method
end # Matcher