diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-24 17:52:11 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-24 17:52:22 -0700 |
commit | 98c7fe87690ca4de6c46e8f69806e82e3f8af42d (patch) | |
tree | f7b49029582af9f6b9e631989038131a30eab7ce /actionpack/lib/action_dispatch/routing/route_set.rb | |
parent | 107c27bb2154bc754ae8b26453460466cd6312e4 (diff) | |
download | rails-98c7fe87690ca4de6c46e8f69806e82e3f8af42d.tar.gz rails-98c7fe87690ca4de6c46e8f69806e82e3f8af42d.tar.bz2 rails-98c7fe87690ca4de6c46e8f69806e82e3f8af42d.zip |
unwrap the constraints object on initialization, eliminate loops
Unwrap Constraints objects. I don't actually think it's possible
to pass a Constraints object to this constructor, but there were
multiple places that kept testing children of this object. I
*think* they were just being defensive, but I have no idea.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 40c767e685..924455bce2 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -704,7 +704,7 @@ module ActionDispatch old_params = req.path_parameters req.path_parameters = old_params.merge params dispatcher = route.app - while dispatcher.is_a?(Mapper::Constraints) && dispatcher.matches?(env) do + if dispatcher.is_a?(Mapper::Constraints) && dispatcher.matches?(env) dispatcher = dispatcher.app end |