class RuboCop::Cop::Style::EvalWithLocation

def on_send(node)

def on_send(node)
  # Classes should not redefine eval, but in case one does, it shouldn't
  # register an offense. Only `eval` without a receiver and `Kernel.eval`
  # are considered.
  return if node.method?(:eval) && !valid_eval_receiver?(node.receiver)
  code = node.arguments.first
  return unless code && (code.str_type? || code.dstr_type?)
  check_location(node, code)
end