From baad391196b7ea6f6072447ee503bae8f25af76b Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 21 Feb 2024 09:30:39 -0300 Subject: [PATCH] Remove unused intermediate variable It was necessary to return properly with the previous deprecation code, which was removed in eccc6061f4f3abdfdeb9a363987a898418d9498f. --- .../active_record/connection_adapters/abstract/transaction.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb index f7ca6157af7..eb473142aaf 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb @@ -533,8 +533,7 @@ module ActiveRecord @connection.lock.synchronize do transaction = begin_transaction(isolation: isolation, joinable: joinable) begin - ret = yield - ret + yield rescue Exception => error rollback_transaction after_failure_actions(transaction, error)