Permalink
Browse files

Remove conditional, since results are always an instance of `ActiveRe…

…cord::Result`
  • Loading branch information...
1 parent 01d4941 commit 551f52c22f97ed341021c2e4f9088bf43d6fd1bd @vipulnsward vipulnsward committed Jul 6, 2013
Showing with 1 addition and 8 deletions.
  1. +1 −8 activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
@@ -75,14 +75,7 @@ def cache_sql(sql, binds)
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

0 comments on commit 551f52c

Please sign in to comment.