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

Merge pull request #15254 from DNNX/formatter-refactoring-3

Rename `stack` to `queue`
This commit is contained in:
Rafael Mendonça França 2014-05-22 16:02:23 -03:00
commit 70ec49c87a

View file

@ -96,14 +96,14 @@ module ActionDispatch
def non_recursive(cache, options)
routes = []
stack = [cache]
queue = [cache]
while stack.any?
c = stack.shift
while queue.any?
c = queue.shift
routes.concat(c[:___routes]) if c.key?(:___routes)
options.each do |pair|
stack << c[pair] if c.key?(pair)
queue << c[pair] if c.key?(pair)
end
end