lib/mutant/matcher/method/singleton.rb in mutant-0.8.10 vs lib/mutant/matcher/method/singleton.rb in mutant-0.8.11

- old
+ new

@@ -14,13 +14,14 @@ super(scope, method_name, Evaluator) end # Singleton method evaluator class Evaluator < Evaluator - SUBJECT_CLASS = Subject::Method::Singleton - RECEIVER_INDEX = 0 - NAME_INDEX = 1 + SUBJECT_CLASS = Subject::Method::Singleton + RECEIVER_INDEX = 0 + NAME_INDEX = 1 + RECEIVER_WARNING = 'Can only match :defs on :self or :const got %p unable to match'.freeze private # Test for node match # @@ -63,10 +64,10 @@ when :self true when :const receiver_name?(receiver) else - env.warn(format('Can only match :defs on :self or :const got %s unable to match', receiver.type.inspect)) + env.warn(RECEIVER_WARNING % receiver.type) nil end end # Test if receiver name matches context