diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-27 14:39:24 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-27 14:39:24 -0700 |
commit | 6a3d6b7f1352efd3e7b931533740252b04850e27 (patch) | |
tree | ac09cfdb552b5196f16bc4b13f2db59a42c8d630 /activerecord | |
parent | f6ddb3553a38d7d479b0177ff29eb4a2a3c17e9f (diff) | |
download | rails-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.rb | 10 |
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 |