aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorMolchanov Andrey <neodelf@gmail.com>2016-05-09 22:07:50 +0300
committerMolchanov Andrey <neodelf@gmail.com>2016-05-10 09:55:58 +0300
commit88f804d3a984e50e831ed466a3b8b2ab7df5ce85 (patch)
tree02a328d5547fc63bf9c1f91daf84570cf015611b /activerecord/lib
parent288c01fc5f09a052918c3378a209063a44dab73e (diff)
downloadrails-88f804d3a984e50e831ed466a3b8b2ab7df5ce85.tar.gz
rails-88f804d3a984e50e831ed466a3b8b2ab7df5ce85.tar.bz2
rails-88f804d3a984e50e831ed466a3b8b2ab7df5ce85.zip
Replacement cycle for readability
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index 48437a1c9e..15844de0bc 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -124,8 +124,7 @@ module ActiveRecord
scope = last_chain_scope(scope, table, owner_reflection, owner, association_klass)
reflection = chain_head
- loop do
- break unless reflection
+ while reflection
table = reflection.alias_name
unless reflection == chain_tail