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:
commit
70ec49c87a
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue