class ActionDispatch::Routing::RouteSet

def recognize_path(path, environment = {})

def recognize_path(path, environment = {})
  method = (environment[:method] || "GET").to_s.upcase
  path = Journey::Router::Utils.normalize_path(path) unless %r{://}.match?(path)
  extras = environment[:extras] || {}
  begin
    env = Rack::MockRequest.env_for(path, method: method)
  rescue URI::InvalidURIError => e
    raise ActionController::RoutingError, e.message
  end
  req = make_request(env)
  recognize_path_with_request(req, path, extras)
end