1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Constraints#app should never return another Constraints object, so switch to if statement

This commit is contained in:
Aaron Patterson 2014-05-25 13:43:14 -07:00
parent b6ec5e2c14
commit 8a51ec0158

View file

@ -23,7 +23,7 @@ module ActionDispatch
# to pass a Constraints object to this constructor, but there were # to pass a Constraints object to this constructor, but there were
# multiple places that kept testing children of this object. I # multiple places that kept testing children of this object. I
# *think* they were just being defensive, but I have no idea. # *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 constraints += app.constraints
app = app.app app = app.app
end end