From 6a3d6b7f1352efd3e7b931533740252b04850e27 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 27 Oct 2010 14:39:24 -0700 Subject: select_all() should always return an array, so no need to test --- .../active_record/connection_adapters/abstract/query_cache.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb') 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 6ec023f0e5..d555308485 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb @@ -1,5 +1,3 @@ -require 'active_support/core_ext/object/duplicable' - module ActiveRecord module ConnectionAdapters # :nodoc: module QueryCache @@ -68,13 +66,7 @@ module ActiveRecord @query_cache[sql][binds] = yield end - if Array === result - result.collect { |row| row.dup } - else - result.duplicable? ? result.dup : result - end - rescue TypeError - result + result.collect { |row| row.dup } end end end -- cgit v1.2.3