diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-03-12 22:42:50 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2019-03-12 22:42:50 +0100 |
commit | f45084c746a79cee3ff6c08fc4e42be15cac2bba (patch) | |
tree | b8a132c4a57f51082051ae8fbdeae9d0503b6f32 /activerecord | |
parent | 8b3d2d1a717d795dd443d37ab762f82c2bccd6c1 (diff) | |
download | rails-f45084c746a79cee3ff6c08fc4e42be15cac2bba.tar.gz rails-f45084c746a79cee3ff6c08fc4e42be15cac2bba.tar.bz2 rails-f45084c746a79cee3ff6c08fc4e42be15cac2bba.zip |
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.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/schema_cache.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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+. |