From f45084c746a79cee3ff6c08fc4e42be15cac2bba Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Tue, 12 Mar 2019 22:42:50 +0100 Subject: Modernize size calculation in Schema Cache Not looking for other contributions like this, but I took the liberty since I was already working on this. --- activerecord/lib/active_record/connection_adapters/schema_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb index c10765f42d..2653e3c74e 100644 --- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb @@ -92,7 +92,7 @@ module ActiveRecord end def size - [@columns, @columns_hash, @primary_keys, @data_sources].map(&:size).inject :+ + [@columns, @columns_hash, @primary_keys, @data_sources].sum(&:size) end # Clear out internal caches for the data source +name+. -- cgit v1.2.3