aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2013-07-06 20:00:45 +0530
committerVipul A M <vipulnsward@gmail.com>2013-07-06 20:00:45 +0530
commit551f52c22f97ed341021c2e4f9088bf43d6fd1bd (patch)
treeb0dfe9039e8731e4d5ede57aa1342ef07c60c855 /activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
parent01d4941d0c87764742562c59d4bf7bb34ac108c4 (diff)
downloadrails-551f52c22f97ed341021c2e4f9088bf43d6fd1bd.tar.gz
rails-551f52c22f97ed341021c2e4f9088bf43d6fd1bd.tar.bz2
rails-551f52c22f97ed341021c2e4f9088bf43d6fd1bd.zip
Remove conditional, since results are always an instance of `ActiveRecord::Result`
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb')
-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 41e07fbda9..5d9237318f 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
@@ -75,14 +75,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