rails/rails — pull request #11166 by xavier (2013-06-28 14:05:36+00:00)
Title: Callable route constraint verification

#### Current situation

When passing an object (other than a hash) as a routing constraint, it must either respond to `:call` or `:matches?`.

If a non-complying object is provided, the routing configuration is processed but Rails silently fails to enforce the constraint.

#### Improvement

This patch verifies that the given constraint object responds to the expected messages and raises an `ArgumentError` at configuration time.