aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorViktar Basharymau <viktar.basharymau@thehamon.com>2014-05-22 21:33:26 +0300
committerViktar Basharymau <viktar.basharymau@thehamon.com>2014-05-22 21:33:26 +0300
commit2dafd87edde0234fcf38f5ecb40be581c9a5594d (patch)
treee568d969977a796de0eccbf2a2bde0117c4afc30 /actionpack
parent66dd216705c9401cfa559a52910df80bd9c7808b (diff)
downloadrails-2dafd87edde0234fcf38f5ecb40be581c9a5594d.tar.gz
rails-2dafd87edde0234fcf38f5ecb40be581c9a5594d.tar.bz2
rails-2dafd87edde0234fcf38f5ecb40be581c9a5594d.zip
Rename `stack` to `queue`
Because it is used as a queue (FIFO), not as a stack (LIFO). * http://en.wikipedia.org/wiki/Stack_(abstract_data_type) * http://en.wikipedia.org/wiki/Queue_(data_structure)
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/journey/formatter.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/journey/formatter.rb b/actionpack/lib/action_dispatch/journey/formatter.rb
index 7eaf8e49ce..f9b343dbc8 100644
--- a/actionpack/lib/action_dispatch/journey/formatter.rb
+++ b/actionpack/lib/action_dispatch/journey/formatter.rb
@@ -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