aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-08-07 21:32:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-08-07 21:32:10 -0700
commit765b8aa05c2176ec8d12b623ffc3df330f4ea383 (patch)
tree8b13fd3a6a87ed6ad575825fb33a0894f0d6c0cd /activerecord/lib/active_record
parent908796dac5c702123415727fd28f6f9633dc2354 (diff)
parent551f52c22f97ed341021c2e4f9088bf43d6fd1bd (diff)
downloadrails-765b8aa05c2176ec8d12b623ffc3df330f4ea383.tar.gz
rails-765b8aa05c2176ec8d12b623ffc3df330f4ea383.tar.bz2
rails-765b8aa05c2176ec8d12b623ffc3df330f4ea383.zip
Merge pull request #11331 from vipulnsward/remove_conditional
Remove conditional, results are always an instance of `ActiveRecord::Result`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
index e6b3c8ec9f..7aae297cdc 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
@@ -81,14 +81,7 @@ module ActiveRecord
else
@query_cache[sql][binds] = yield
end
-
- # FIXME: we should guarantee that all cached items are Result
- # objects. Then we can avoid this conditional
- if ActiveRecord::Result === result
- result.dup
- else
- result.collect { |row| row.dup }
- end
+ result.dup
end
# If arel is locked this is a SELECT ... FOR UPDATE or somesuch. Such