lib/rubocop/cop/rails/date.rb in rubocop-0.32.0 vs lib/rubocop/cop/rails/date.rb in rubocop-0.32.1

- old
+ new

@@ -52,11 +52,11 @@ check_date_node(node.parent) if klass == :Date end def on_send(node) - method_name = extract_method(node) - return unless bad_methods.include?(method_name) + receiver, method_name, *_args = *node + return unless receiver && bad_methods.include?(method_name) add_offense(node, :selector, format(MSG_SEND, method_name )