class ActionDispatch::Routing::Mapper::Mapping

def normalize_options!

def normalize_options!
  path_without_format = @path.sub(/\(\.:format\)$/, '')
  if using_match_shorthand?(path_without_format, @options)
    to_shorthand    = @options[:to].blank?
    @options[:to] ||= path_without_format[1..-1].sub(%r{/([^/]*)$}, '#\1')
    @options[:as] ||= Mapper.normalize_name(path_without_format)
  end
  @options.merge!(default_controller_and_action(to_shorthand))
end