From 551f52c22f97ed341021c2e4f9088bf43d6fd1bd Mon Sep 17 00:00:00 2001
From: Vipul A M <vipulnsward@gmail.com>
Date: Sat, 6 Jul 2013 20:00:45 +0530
Subject: Remove conditional, since results are always an instance of
 `ActiveRecord::Result`

---
 .../active_record/connection_adapters/abstract/query_cache.rb    | 9 +--------
 1 file changed, 1 insertion(+), 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
-- 
cgit v1.2.3