Skip to content
Browse files

Merge pull request #11331 from vipulnsward/remove_conditional

Remove conditional, results are always an instance of `ActiveRecord::Result`
  • Loading branch information...
2 parents 908796d + 551f52c commit 765b8aa05c2176ec8d12b623ffc3df330f4ea383 @tenderlove tenderlove committed
Showing with 1 addition and 8 deletions.
  1. +1 −8 activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
View
9 activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
@@ -81,14 +81,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 765b8aa

Please sign in to comment.
Something went wrong with that request. Please try again.