aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-05-07 20:12:28 +0200
committerXavier Noria <fxn@hashref.com>2016-05-07 20:12:28 +0200
commit692715eb7aa5312398d2552881e872216147b63f (patch)
tree7e2bbf5ef56b175d9e73b88373ad0fb2cb27570f
parent33f8dac38b07165e4046f99e47958e7aad053947 (diff)
parent95e2d35bb8421b80e177d82470bcac3b3a63b7e6 (diff)
downloadrails-692715eb7aa5312398d2552881e872216147b63f.tar.gz
rails-692715eb7aa5312398d2552881e872216147b63f.tar.bz2
rails-692715eb7aa5312398d2552881e872216147b63f.zip
Merge pull request #24906 from Neodelf/refactoring_loop
Replace `loop` to `until`
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index faa93ecc17..4c2a4cfeb0 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -2088,8 +2088,7 @@ to this:
def each
node = self
- loop do
- break if node.equal? NULL
+ until node.equal? NULL
yield node
node = node.parent
end