From b1458218c95d85c4ce911dd3e99da5ae7cf7aeee Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 24 Apr 2019 03:46:45 +0900 Subject: Lazy allocate `@_start_transaction_state` --- activerecord/lib/active_record/core.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/core.rb') diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 068ebf3c09..351865dfbc 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -403,7 +403,7 @@ module ActiveRecord @new_record = true @destroyed = false - @_start_transaction_state = {} + @_start_transaction_state = nil @transaction_state = nil super @@ -575,7 +575,7 @@ module ActiveRecord @marked_for_destruction = false @destroyed_by_association = nil @new_record = true - @_start_transaction_state = {} + @_start_transaction_state = nil @transaction_state = nil end -- cgit v1.2.3