From 8a51ec01581625876904bb785f66aac9788e043d Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Sun, 25 May 2014 13:43:14 -0700
Subject: Constraints#app should never return another Constraints object, so
 switch to if statement

---
 actionpack/lib/action_dispatch/routing/mapper.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'actionpack')

diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index a6f17b9459..9656109ed3 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -23,7 +23,7 @@ module ActionDispatch
           # 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.
-          while app.is_a?(self.class)
+          if app.is_a?(self.class)
             constraints += app.constraints
             app = app.app
           end
-- 
cgit v1.2.3