module ActionView::AbstractRenderer::ObjectRendering

def local_variable(path)

def local_variable(path)
  if as = @options[:as]
    raise_invalid_option_as(as) unless /\A[a-z_]\w*\z/.match?(as.to_s)
    as.to_sym
  else
    base = path.end_with?("/") ? "" : File.basename(path)
    raise_invalid_identifier(path) unless base =~ /\A_?(.*?)(?:\.\w+)*\z/
    $1.to_sym
  end
end