lib/reek/context/method_context.rb in reek-3.0.3 vs lib/reek/context/method_context.rb in reek-3.0.4

- old
+ new

@@ -41,24 +41,24 @@ def record_call_to(exp) receiver, meth = exp[1..2] receiver ||= [:self] case receiver[0] when :lvasgn - @refs.record_reference_to(receiver.name) + @refs.record_reference_to(receiver.name, line: exp.line) when :lvar - @refs.record_reference_to(receiver.name) unless meth == :new + @refs.record_reference_to(receiver.name, line: exp.line) unless meth == :new when :self - @refs.record_reference_to(:self) + @refs.record_reference_to(:self, line: exp.line) end end def record_use_of_self @refs.record_reference_to(:self) end def envious_receivers - return [] if @refs.self_is_max? - @refs.max_keys + return {} if @refs.self_is_max? + @refs.most_popular end def references_self? exp.depends_on_instance? end