diff options
author | Benoit Tigeot <btigeot@octo.com> | 2017-01-22 15:07:11 +0100 |
---|---|---|
committer | Benoit Tigeot <btigeot@octo.com> | 2017-01-22 15:21:52 +0100 |
commit | 637c0455af2f3d3021b5c28a365250ac125b5ae2 (patch) | |
tree | aa14cbcf7352e0b6cac68e7887d1c66cea8c9095 /activerecord | |
parent | fb5bd3c6f2f29c3ed370e82db0d3de52a97a0648 (diff) | |
download | rails-637c0455af2f3d3021b5c28a365250ac125b5ae2.tar.gz rails-637c0455af2f3d3021b5c28a365250ac125b5ae2.tar.bz2 rails-637c0455af2f3d3021b5c28a365250ac125b5ae2.zip |
Freeze default empty string for sql_type in get_oid_type
One empty string allocation per column per row.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 0ebd907cc0..735a26c436 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -438,7 +438,7 @@ module ActiveRecord end end - def get_oid_type(oid, fmod, column_name, sql_type = "") + def get_oid_type(oid, fmod, column_name, sql_type = "".freeze) if !type_map.key?(oid) load_additional_types(type_map, [oid]) end |