aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-27 14:39:24 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-27 14:39:24 -0700
commit6a3d6b7f1352efd3e7b931533740252b04850e27 (patch)
treeac09cfdb552b5196f16bc4b13f2db59a42c8d630 /activerecord
parentf6ddb3553a38d7d479b0177ff29eb4a2a3c17e9f (diff)
downloadrails-6a3d6b7f1352efd3e7b931533740252b04850e27.tar.gz
rails-6a3d6b7f1352efd3e7b931533740252b04850e27.tar.bz2
rails-6a3d6b7f1352efd3e7b931533740252b04850e27.zip
select_all() should always return an array, so no need to test
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb10
1 files changed, 1 insertions, 9 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 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