diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-22 23:09:03 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-22 23:12:23 +0900 |
commit | 5454cc40c5de850db7dfcef1e97f30c255299f22 (patch) | |
tree | c4c99ef124827a0c26e32fac105f883a999f6a9d /activerecord/lib/active_record | |
parent | 70d64169ae03eff911028be80b7f00bbb5784a67 (diff) | |
download | rails-5454cc40c5de850db7dfcef1e97f30c255299f22.tar.gz rails-5454cc40c5de850db7dfcef1e97f30c255299f22.tar.bz2 rails-5454cc40c5de850db7dfcef1e97f30c255299f22.zip |
Avoid new string instance creation in `InsertAll#execute`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/insert_all.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/insert_all.rb b/activerecord/lib/active_record/insert_all.rb index 959e5bd4d7..f6577dcbc4 100644 --- a/activerecord/lib/active_record/insert_all.rb +++ b/activerecord/lib/active_record/insert_all.rb @@ -21,9 +21,9 @@ module ActiveRecord end def execute - message = "#{model} " - message += "Bulk " if inserts.many? - message += (on_duplicate == :update ? "Upsert" : "Insert") + message = +"#{model} " + message << "Bulk " if inserts.many? + message << (on_duplicate == :update ? "Upsert" : "Insert") connection.exec_query to_sql, message end |