提交 70ec49c8 编写于 作者: R Rafael Mendonça França

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

Rename `stack` to `queue`
......@@ -96,14 +96,14 @@ def match_route(name, options)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册