class ActionDispatch::Routing::Mapper::Mapping

def constraints(options, path_params)

def constraints(options, path_params)
  options.group_by do |key, option|
    if Regexp === option
      :constraints
    else
      if path_params.include?(key)
        :path_params
      else
        :required_defaults
      end
    end
  end
end