Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-activerecord-8.0 for 
openSUSE:Factory checked in at 2026-07-07 21:05:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activerecord-8.0 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-activerecord-8.0.new.1982 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-activerecord-8.0"

Tue Jul  7 21:05:03 2026 rev:7 rq:1364224 version:8.0.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-activerecord-8.0/rubygem-activerecord-8.0.changes
        2025-10-10 17:13:48.028482211 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-activerecord-8.0.new.1982/rubygem-activerecord-8.0.changes
      2026-07-07 21:07:48.971869823 +0200
@@ -1,0 +2,6 @@
+Tue Jul  7 09:04:45 UTC 2026 - Aleksei Burlakov <[email protected]>
+
+- Update to version 8.0.5:
+  
https://rubyonrails.org/2026/3/24/Rails-Versions-8-0-5-and-8-1-3-have-been-released
 
+
+-------------------------------------------------------------------

Old:
----
  activerecord-8.0.3.gem

New:
----
  activerecord-8.0.5.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-activerecord-8.0.spec ++++++
--- /var/tmp/diff_new_pack.Yk1ctI/_old  2026-07-07 21:07:49.547889685 +0200
+++ /var/tmp/diff_new_pack.Yk1ctI/_new  2026-07-07 21:07:49.547889685 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-activerecord-8.0
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-activerecord-8.0
-Version:        8.0.3
+Version:        8.0.5
 Release:        0
 %define mod_name activerecord
 %define mod_full_name %{mod_name}-%{version}

++++++ activerecord-8.0.3.gem -> activerecord-8.0.5.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    1980-01-02 01:00:00.000000000 +0100
+++ new/CHANGELOG.md    1980-01-02 01:00:00.000000000 +0100
@@ -1,3 +1,139 @@
+## Rails 8.0.5 (March 24, 2026) ##
+
+*   Fix `insert_all` and `upsert_all` log message when called on anonymous 
classes.
+
+    *Gabriel Sobrinho*
+
+*   Respect `ActiveRecord::SchemaDumper.ignore_tables` when dumping SQLite 
virtual tables.
+
+    *Hans Schnedlitz*
+
+*   Restore previous instrumenter after `execute_or_skip`
+
+    `FutureResult#execute_or_skip` replaces the thread's instrumenter with an
+    `EventBuffer` to collect events published during async query execution.
+    If the global async executor is saturated and the `caller_runs` fallback
+    executes the task on the calling thread, we need to make sure the previous
+    instrumenter is restored or the stale `EventBuffer` would stay in place and
+    permanently swallow all subsequent `sql.active_record` notifications on
+    that thread.
+
+    *Rosa Gutierrez*
+
+*   Fix Ruby 4.0 delegator warning when calling inspect on 
ActiveRecord::Type::Serialized.
+
+    *Hammad Khan*
+
+*   Fix support for table names containing hyphens.
+
+    *Evgeniy Demin*
+
+*   Fix column deduplication for SQLite3 and PostgreSQL virtual (generated) 
columns.
+
+    `Column#==` and `Column#hash` now account for `virtual?` so that the
+    `Deduplicable` registry does not treat a generated column and a regular
+    column with the same name and type as identical. Previously, if a
+    generated column was registered first, a regular column on a different
+    table could be deduplicated to the generated instance, silently
+    excluding it from INSERT/UPDATE statements.
+
+    *Jay Huber*
+
+*   Fix merging relations with arel equality predicates with null relations.
+
+    *fatkodima*
+
+*   Fix SQLite3 schema dump for non-autoincrement integer primary keys.
+
+    Previously, `schema.rb` should incorrectly restore that table with an auto 
incrementing
+    primary key.
+
+    *Chris HasiƄski*
+
+*   Fix PostgreSQL `schema_search_path` not being reapplied after `reset!` or 
`reconnect!`.
+
+    The `schema_search_path` configured in `database.yml` is now correctly
+    reapplied instead of falling back to PostgreSQL defaults.
+
+    *Tobias Egli*
+
+*   Ensure batched preloaded associations accounts for klass when grouping to 
avoid issues with STI.
+
+    *zzak*, *Stjepan Hadjic*
+
+*   Fix `ActiveRecord::SoleRecordExceeded#record` to return the relation.
+
+    This was the case until Rails 7.2, but starting from 8.0 it
+    started mistakenly returning the model class.
+
+    *Jean Boussier*
+
+*   Improve PostgreSQLAdapter resilience to Timeout.timeout.
+
+    Better handle asynchronous exceptions being thrown inside
+    the `reconnect!` method.
+
+    This may fixes some deep errors such as:
+
+    ```
+    undefined method `key?' for nil:NilClass (NoMethodError)
+              if !type_map.key?(oid)
+    ```
+
+    *Jean Boussier*
+
+*   Fix `eager_load` when loading `has_many` assocations with composite 
primary keys.
+
+    This would result in some records being loaded multiple times.
+
+    *Martin-Alexander*
+
+
+## Rails 8.0.4.1 (March 23, 2026) ##
+
+*   No changes.
+
+
+## Rails 8.0.4 (October 28, 2025) ##
+
+*   Fix SQLite3 data loss during table alterations with CASCADE foreign keys.
+
+    When altering a table in SQLite3 that is referenced by child tables with
+    `ON DELETE CASCADE` foreign keys, ActiveRecord would silently delete all
+    data from the child tables. This occurred because SQLite requires table
+    recreation for schema changes, and during this process the original table
+    is temporarily dropped, triggering CASCADE deletes on child tables.
+
+    The root cause was incorrect ordering of operations. The original code
+    wrapped `disable_referential_integrity` inside a transaction, but
+    `PRAGMA foreign_keys` cannot be modified inside a transaction in SQLite -
+    attempting to do so simply has no effect. This meant foreign keys remained
+    enabled during table recreation, causing CASCADE deletes to fire.
+
+    The fix reverses the order to follow the official SQLite 12-step ALTER 
TABLE
+    procedure: `disable_referential_integrity` now wraps the transaction 
instead
+    of being wrapped by it. This ensures foreign keys are properly disabled
+    before the transaction starts and re-enabled after it commits, preventing
+    CASCADE deletes while maintaining data integrity through atomic 
transactions.
+
+    *Ruy Rocha*
+
+*   Add support for bound SQL literals in CTEs.
+
+    *Nicolas Bachschmidt*
+
+*   Fix `belongs_to` associations not to clear the entire composite primary 
key.
+
+    When clearing a `belongs_to` association that references a model with 
composite primary key,
+    only the optional part of the key should be cleared.
+
+    *zzak*
+
+*   Fix invalid records being autosaved when distantly associated records are 
marked for deletion.
+
+    *Ian Terrell*, *axlekb AB*
+
+
 ## Rails 8.0.3 (September 22, 2025) ##
 
 *   Fix query cache for pinned connections in multi threaded transactional 
tests
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/associations/belongs_to_association.rb 
new/lib/active_record/associations/belongs_to_association.rb
--- old/lib/active_record/associations/belongs_to_association.rb        
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/associations/belongs_to_association.rb        
1980-01-02 01:00:00.000000000 +0100
@@ -135,7 +135,9 @@
             target_key_values = record ? Array(primary_key(record.class)).map 
{ |key| record._read_attribute(key) } : []
 
             if force || reflection_fk.map { |fk| owner._read_attribute(fk) } 
!= target_key_values
+              owner_pk = Array(owner.class.primary_key)
               reflection_fk.each_with_index do |key, index|
+                next if record.nil? && owner_pk.include?(key)
                 owner[key] = target_key_values[index]
               end
             end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/associations/join_dependency.rb 
new/lib/active_record/associations/join_dependency.rb
--- old/lib/active_record/associations/join_dependency.rb       1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/associations/join_dependency.rb       1980-01-02 
01:00:00.000000000 +0100
@@ -103,7 +103,7 @@
       end
 
       def instantiate(result_set, strict_loading_value, &block)
-        primary_key = aliases.column_alias(join_root, join_root.primary_key)
+        primary_key = Array(join_root.primary_key).map { |column| 
aliases.column_alias(join_root, column) }
 
         seen = Hash.new { |i, parent|
           i[parent] = Hash.new { |j, child_class|
@@ -141,7 +141,7 @@
 
         message_bus.instrument("instantiation.active_record", payload) do
           result_set.each { |row_hash|
-            parent_key = primary_key ? row_hash[primary_key] : row_hash
+            parent_key = primary_key.empty? ? row_hash : 
row_hash.values_at(*primary_key)
             parent = parents[parent_key] ||= join_root.instantiate(row_hash, 
column_aliases, column_types, &block)
             construct(parent, join_root, row_hash, seen, model_cache, 
strict_loading_value)
           }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/associations/preloader/batch.rb 
new/lib/active_record/associations/preloader/batch.rb
--- old/lib/active_record/associations/preloader/batch.rb       1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/associations/preloader/batch.rb       1980-01-02 
01:00:00.000000000 +0100
@@ -38,7 +38,13 @@
           attr_reader :loaders
 
           def group_and_load_similar(loaders)
-            
loaders.grep_v(ThroughAssociation).group_by(&:loader_query).each_pair do 
|query, similar_loaders|
+            non_through = loaders.grep_v(ThroughAssociation)
+
+            grouped = non_through.group_by do |loader|
+              [loader.loader_query, loader.klass]
+            end
+
+            grouped.each do |(query, _klass), similar_loaders|
               query.load_records_in_batch(similar_loaders)
             end
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/autosave_association.rb 
new/lib/active_record/autosave_association.rb
--- old/lib/active_record/autosave_association.rb       1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/autosave_association.rb       1980-01-02 
01:00:00.000000000 +0100
@@ -374,7 +374,7 @@
         context = validation_context if custom_validation_context?
         return true if record.valid?(context)
 
-        if record.changed? || record.new_record? || context
+        if context || record.changed_for_autosave?
           associated_errors = record.errors.objects
         else
           # If there are existing invalid records in the DB, we should still 
be able to reference them.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/abstract/connection_pool.rb 
new/lib/active_record/connection_adapters/abstract/connection_pool.rb
--- old/lib/active_record/connection_adapters/abstract/connection_pool.rb       
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/abstract/connection_pool.rb       
1980-01-02 01:00:00.000000000 +0100
@@ -120,7 +120,7 @@
     class ConnectionPool
       # Prior to 3.3.5, WeakKeyMap had a use after free bug
       # https://bugs.ruby-lang.org/issues/20688
-      if ObjectSpace.const_defined?(:WeakKeyMap) && RUBY_VERSION >= "3.3.5"
+      if ObjectSpace.const_defined?(:WeakKeyMap) && 
Gem::Version.new(RUBY_VERSION) >= "3.3.5"
         WeakThreadKeyMap = ObjectSpace::WeakKeyMap
       else
         class WeakThreadKeyMap # :nodoc:
@@ -463,7 +463,7 @@
               end
               conn.disconnect!
             end
-            @connections = []
+            @connections = @pinned_connection ? [@pinned_connection] : []
             @leases.clear
             @available.clear
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/abstract/database_statements.rb 
new/lib/active_record/connection_adapters/abstract/database_statements.rb
--- old/lib/active_record/connection_adapters/abstract/database_statements.rb   
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/abstract/database_statements.rb   
1980-01-02 01:00:00.000000000 +0100
@@ -738,7 +738,7 @@
         end
 
         def extract_table_ref_from_insert_sql(sql)
-          if sql =~ /into\s("[A-Za-z0-9_."\[\]\s]+"|[A-Za-z0-9_."\[\]]+)\s*/im
+          if sql =~ /into\s("[-A-Za-z0-9_."\[\]\s]+"|[A-Za-z0-9_."\[\]]+)\s*/im
             $1.delete('"').strip
           end
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/abstract/schema_statements.rb 
new/lib/active_record/connection_adapters/abstract/schema_statements.rb
--- old/lib/active_record/connection_adapters/abstract/schema_statements.rb     
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/abstract/schema_statements.rb     
1980-01-02 01:00:00.000000000 +0100
@@ -1560,11 +1560,11 @@
         non_combinable_operations = []
 
         operations.each do |command, args|
-          table, arguments = args.shift, args
+          args.shift # remove table_name
           method = :"#{command}_for_alter"
 
           if respond_to?(method, true)
-            sqls, procs = Array(send(method, table, *arguments)).partition { 
|v| v.is_a?(String) }
+            sqls, procs = Array(send(method, table_name, *args)).partition { 
|v| v.is_a?(String) }
             sql_fragments.concat(sqls)
             non_combinable_operations.concat(procs)
           else
@@ -1572,7 +1572,7 @@
             non_combinable_operations.each(&:call)
             sql_fragments = []
             non_combinable_operations = []
-            send(command, table, *arguments)
+            send(command, table_name, *args)
           end
         end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/abstract_adapter.rb 
new/lib/active_record/connection_adapters/abstract_adapter.rb
--- old/lib/active_record/connection_adapters/abstract_adapter.rb       
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/abstract_adapter.rb       
1980-01-02 01:00:00.000000000 +0100
@@ -666,34 +666,33 @@
         deadline = retry_deadline && 
Process.clock_gettime(Process::CLOCK_MONOTONIC) + retry_deadline
 
         @lock.synchronize do
-          reconnect
+          attempt_configure_connection do
+            reconnect
 
-          enable_lazy_transactions!
-          @raw_connection_dirty = false
-          @last_activity = Process.clock_gettime(Process::CLOCK_MONOTONIC)
-          @verified = true
-
-          reset_transaction(restore: restore_transactions) do
-            clear_cache!(new_connection: true)
-            attempt_configure_connection
-          end
-        rescue => original_exception
-          translated_exception = translate_exception_class(original_exception, 
nil, nil)
-          retry_deadline_exceeded = deadline && deadline < 
Process.clock_gettime(Process::CLOCK_MONOTONIC)
-
-          if !retry_deadline_exceeded && retries_available > 0
-            retries_available -= 1
-
-            if retryable_connection_error?(translated_exception)
-              backoff(connection_retries - retries_available)
-              retry
+            enable_lazy_transactions!
+            @raw_connection_dirty = false
+            @last_activity = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+            @verified = true
+
+            reset_transaction(restore: restore_transactions) do
+              clear_cache!(new_connection: true)
+              configure_connection
+            end
+          rescue => original_exception
+            translated_exception = 
translate_exception_class(original_exception, nil, nil)
+            retry_deadline_exceeded = deadline && deadline < 
Process.clock_gettime(Process::CLOCK_MONOTONIC)
+
+            if !retry_deadline_exceeded && retries_available > 0
+              retries_available -= 1
+
+              if retryable_connection_error?(translated_exception)
+                backoff(connection_retries - retries_available)
+                retry
+              end
             end
-          end
-
-          @last_activity = nil
-          @verified = false
 
-          raise translated_exception
+            raise translated_exception
+          end
         end
       end
 
@@ -701,6 +700,8 @@
       # method does nothing.
       def disconnect!
         @lock.synchronize do
+          @last_activity = nil
+          @verified = false
           clear_cache!(new_connection: true)
           reset_transaction
           @raw_connection_dirty = false
@@ -726,9 +727,11 @@
       # should call super immediately after resetting the connection (and while
       # still holding @lock).
       def reset!
-        clear_cache!(new_connection: true)
-        reset_transaction
-        attempt_configure_connection
+        attempt_configure_connection do
+          clear_cache!(new_connection: true)
+          reset_transaction
+          configure_connection
+        end
       end
 
       # Removes the connection from the pool and disconnect it.
@@ -762,11 +765,13 @@
         unless active?
           @lock.synchronize do
             if @unconfigured_connection
-              @raw_connection = @unconfigured_connection
-              @unconfigured_connection = nil
-              attempt_configure_connection
-              @last_activity = Process.clock_gettime(Process::CLOCK_MONOTONIC)
-              @verified = true
+              attempt_configure_connection do
+                @raw_connection = @unconfigured_connection
+                @unconfigured_connection = nil
+                configure_connection
+                @last_activity = 
Process.clock_gettime(Process::CLOCK_MONOTONIC)
+                @verified = true
+              end
               return
             end
 
@@ -1216,7 +1221,7 @@
         end
 
         def attempt_configure_connection
-          configure_connection
+          yield
         rescue Exception # Need to handle things such as Timeout::ExitException
           disconnect!
           raise
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/postgresql/column.rb 
new/lib/active_record/connection_adapters/postgresql/column.rb
--- old/lib/active_record/connection_adapters/postgresql/column.rb      
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/postgresql/column.rb      
1980-01-02 01:00:00.000000000 +0100
@@ -65,7 +65,8 @@
           other.is_a?(Column) &&
             super &&
             identity? == other.identity? &&
-            serial? == other.serial?
+            serial? == other.serial? &&
+            virtual? == other.virtual?
         end
         alias :eql? :==
 
@@ -73,7 +74,8 @@
           Column.hash ^
             super.hash ^
             identity?.hash ^
-            serial?.hash
+            serial?.hash ^
+            virtual?.hash
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/postgresql_adapter.rb 
new/lib/active_record/connection_adapters/postgresql_adapter.rb
--- old/lib/active_record/connection_adapters/postgresql_adapter.rb     
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/postgresql_adapter.rb     
1980-01-02 01:00:00.000000000 +0100
@@ -381,6 +381,11 @@
         end
       end
 
+      def clear_cache!(new_connection: false)
+        super
+        @schema_search_path = nil if new_connection
+      end
+
       # Disconnects from the database if already connected. Otherwise, this
       # method does nothing.
       def disconnect!
@@ -993,6 +998,8 @@
           add_pg_encoders
           add_pg_decoders
 
+          schema_search_path # populate cache
+
           reload_type_map
         end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/sqlite3/column.rb 
new/lib/active_record/connection_adapters/sqlite3/column.rb
--- old/lib/active_record/connection_adapters/sqlite3/column.rb 1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/sqlite3/column.rb 1980-01-02 
01:00:00.000000000 +0100
@@ -46,7 +46,9 @@
         def ==(other)
           other.is_a?(Column) &&
             super &&
-            auto_increment? == other.auto_increment?
+            auto_increment? == other.auto_increment? &&
+            rowid == other.rowid &&
+            generated_type == other.generated_type
         end
         alias :eql? :==
 
@@ -54,8 +56,12 @@
           Column.hash ^
             super.hash ^
             auto_increment?.hash ^
-            rowid.hash
+            rowid.hash ^
+            virtual?.hash
         end
+
+        protected
+          attr_reader :generated_type
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb 
new/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb
--- old/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb  
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb  
1980-01-02 01:00:00.000000000 +0100
@@ -6,7 +6,7 @@
       class SchemaDumper < ConnectionAdapters::SchemaDumper # :nodoc:
         private
           def virtual_tables(stream)
-            virtual_tables = @connection.virtual_tables
+            virtual_tables = @connection.virtual_tables.reject { |name, _| 
ignored?(name) }
             if virtual_tables.any?
               stream.puts
               stream.puts "  # Virtual tables defined in this database."
@@ -19,11 +19,23 @@
           end
 
           def default_primary_key?(column)
-            schema_type(column) == :integer
+            schema_type(column) == :integer && primary_key_has_autoincrement?
           end
 
           def explicit_primary_key_default?(column)
-            column.bigint?
+            column.bigint? || (column.type == :integer && 
!primary_key_has_autoincrement?)
+          end
+
+          def primary_key_has_autoincrement?
+            return false unless table_name
+
+            table_sql = @connection.query_value(<<~SQL, "SCHEMA")
+              SELECT sql FROM sqlite_master WHERE name = 
#{@connection.quote(table_name)} AND type = 'table'
+              UNION ALL
+              SELECT sql FROM sqlite_temp_master WHERE name = 
#{@connection.quote(table_name)} AND type = 'table'
+            SQL
+
+            table_sql.to_s.match?(/\bAUTOINCREMENT\b/i)
           end
 
           def prepare_column_options(column)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/connection_adapters/sqlite3_adapter.rb 
new/lib/active_record/connection_adapters/sqlite3_adapter.rb
--- old/lib/active_record/connection_adapters/sqlite3_adapter.rb        
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/connection_adapters/sqlite3_adapter.rb        
1980-01-02 01:00:00.000000000 +0100
@@ -291,7 +291,7 @@
         exec_query "DROP INDEX #{quote_column_name(index_name)}"
       end
 
-      VIRTUAL_TABLE_REGEX = /USING\s+(\w+)\s*\((.+)\)/i
+      VIRTUAL_TABLE_REGEX = /USING\s+(\w+)\s*\((.*)\)/i
 
       # Returns a list of defined virtual tables
       def virtual_tables
@@ -583,8 +583,8 @@
             yield definition if block_given?
           end
 
-          transaction do
-            disable_referential_integrity do
+          disable_referential_integrity do
+            transaction do
               move_table(table_name, altered_table_name, 
options.merge(temporary: true))
               move_table(altered_table_name, table_name, &caller)
             end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/connection_handling.rb 
new/lib/active_record/connection_handling.rb
--- old/lib/active_record/connection_handling.rb        1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/connection_handling.rb        1980-01-02 
01:00:00.000000000 +0100
@@ -172,9 +172,11 @@
       prevent_writes = true if role == ActiveRecord.reading_role
 
       append_to_connected_to_stack(role: role, shard: shard, prevent_writes: 
prevent_writes, klasses: classes)
-      yield
-    ensure
-      connected_to_stack.pop
+      begin
+        yield
+      ensure
+        connected_to_stack.pop
+      end
     end
 
     # Passes the block to +connected_to+ for every +shard+ the
@@ -395,11 +397,13 @@
         prevent_writes = true if role == ActiveRecord.reading_role
 
         append_to_connected_to_stack(role: role, shard: shard, prevent_writes: 
prevent_writes, klasses: [self])
-        return_value = yield
-        return_value.load if return_value.is_a? ActiveRecord::Relation
-        return_value
-      ensure
-        self.connected_to_stack.pop
+        begin
+          return_value = yield
+          return_value.load if return_value.is_a? ActiveRecord::Relation
+          return_value
+        ensure
+          self.connected_to_stack.pop
+        end
       end
 
       def append_to_connected_to_stack(entry)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/future_result.rb 
new/lib/active_record/future_result.rb
--- old/lib/active_record/future_result.rb      1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/active_record/future_result.rb      1980-01-02 01:00:00.000000000 
+0100
@@ -105,6 +105,7 @@
 
         @pool.with_connection do |connection|
           return unless @mutex.try_lock
+          previous_instrumenter = 
ActiveSupport::IsolatedExecutionState[:active_record_instrumenter]
           begin
             if pending?
               @event_buffer = EventBuffer.new(self, @instrumenter)
@@ -113,6 +114,7 @@
               execute_query(connection, async: true)
             end
           ensure
+            ActiveSupport::IsolatedExecutionState[:active_record_instrumenter] 
= previous_instrumenter
             @mutex.unlock
           end
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/gem_version.rb 
new/lib/active_record/gem_version.rb
--- old/lib/active_record/gem_version.rb        1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/active_record/gem_version.rb        1980-01-02 01:00:00.000000000 
+0100
@@ -9,7 +9,7 @@
   module VERSION
     MAJOR = 8
     MINOR = 0
-    TINY  = 3
+    TINY  = 5
     PRE   = nil
 
     STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/insert_all.rb 
new/lib/active_record/insert_all.rb
--- old/lib/active_record/insert_all.rb 1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/insert_all.rb 1980-01-02 01:00:00.000000000 +0100
@@ -39,7 +39,7 @@
       @returning = (connection.supports_insert_returning? ? primary_keys : 
false) if @returning.nil?
       @returning = false if @returning == []
 
-      @unique_by = find_unique_index_for(@unique_by)
+      @unique_by = find_unique_index_for(@unique_by) if @on_duplicate != :raise
 
       configure_on_duplicate_update_logic
       ensure_valid_options_for_connection!
@@ -48,7 +48,7 @@
     def execute
       return ActiveRecord::Result.empty if inserts.empty?
 
-      message = +"#{model} "
+      message = +"#{model.name} "
       message << "Bulk " if inserts.many?
       message << (on_duplicate == :update ? "Upsert" : "Insert")
       connection.exec_insert_all to_sql, message
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/migration/command_recorder.rb 
new/lib/active_record/migration/command_recorder.rb
--- old/lib/active_record/migration/command_recorder.rb 1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/migration/command_recorder.rb 1980-01-02 
01:00:00.000000000 +0100
@@ -139,7 +139,7 @@
           recorder.reverting = @reverting
           yield recorder.delegate.update_table_definition(table_name, recorder)
           commands = recorder.commands
-          @commands << [:change_table, [table_name], -> t { 
bulk_change_table(table_name, commands) }]
+          @commands << [:change_table, [table_name], -> t { 
bulk_change_table(t.name, commands.reverse) }]
         else
           yield delegate.update_table_definition(table_name, self)
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/relation/finder_methods.rb 
new/lib/active_record/relation/finder_methods.rb
--- old/lib/active_record/relation/finder_methods.rb    1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/relation/finder_methods.rb    1980-01-02 
01:00:00.000000000 +0100
@@ -148,7 +148,7 @@
       elsif undesired.nil?
         found
       else
-        raise ActiveRecord::SoleRecordExceeded.new(model)
+        raise ActiveRecord::SoleRecordExceeded.new(self)
       end
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_record/relation/predicate_builder/array_handler.rb 
new/lib/active_record/relation/predicate_builder/array_handler.rb
--- old/lib/active_record/relation/predicate_builder/array_handler.rb   
1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/relation/predicate_builder/array_handler.rb   
1980-01-02 01:00:00.000000000 +0100
@@ -31,7 +31,9 @@
           values_predicate
         else
           array_predicates = ranges.map! { |range| 
predicate_builder.build(attribute, range) }
-          array_predicates.inject(values_predicate, &:or)
+          values_predicate.or(
+            Arel::Nodes::Grouping.new Arel::Nodes::Or.new(array_predicates)
+          )
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/relation/query_methods.rb 
new/lib/active_record/relation/query_methods.rb
--- old/lib/active_record/relation/query_methods.rb     1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/relation/query_methods.rb     1980-01-02 
01:00:00.000000000 +0100
@@ -1928,7 +1928,8 @@
 
       def build_with_expression_from_value(value, nested = false)
         case value
-        when Arel::Nodes::SqlLiteral then Arel::Nodes::Grouping.new(value)
+        when Arel::Nodes::SqlLiteral, Arel::Nodes::BoundSqlLiteral
+          Arel::Nodes::Grouping.new(value)
         when ActiveRecord::Relation
           if nested
             value.arel.ast
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/relation/where_clause.rb 
new/lib/active_record/relation/where_clause.rb
--- old/lib/active_record/relation/where_clause.rb      1980-01-02 
01:00:00.000000000 +0100
+++ new/lib/active_record/relation/where_clause.rb      1980-01-02 
01:00:00.000000000 +0100
@@ -182,7 +182,7 @@
           non_attrs = columns.extract! { |node| node.is_a?(Arel::Predications) 
}
 
           predicates.reject do |node|
-            if !non_attrs.empty? && node.equality? && 
node.left.is_a?(Arel::Predications)
+            if !non_attrs.empty? && equality_node?(node) && 
node.left.is_a?(Arel::Predications)
               non_attrs.include?(node.left)
             end || Arel.fetch_attribute(node) do |attr|
               attrs.include?(attr) || columns.include?(attr.name.to_s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/relation.rb 
new/lib/active_record/relation.rb
--- old/lib/active_record/relation.rb   1980-01-02 01:00:00.000000000 +0100
+++ new/lib/active_record/relation.rb   1980-01-02 01:00:00.000000000 +0100
@@ -1010,7 +1010,7 @@
     #
     #   Post.where(person_id: 5).where(category: ['Something', 
'Else']).delete_all
     #
-    # Both calls delete the affected posts all at once with a single DELETE 
statement.
+    # This call deletes the affected posts all at once with a single DELETE 
statement.
     # If you need to destroy dependent associations or call your 
<tt>before_*</tt> or
     # +after_destroy+ callbacks, use the #destroy_all method instead.
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_record/type/serialized.rb 
new/lib/active_record/type/serialized.rb
--- old/lib/active_record/type/serialized.rb    1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/active_record/type/serialized.rb    1980-01-02 01:00:00.000000000 
+0100
@@ -58,6 +58,11 @@
       end
 
       private
+        # Prevent Ruby 4.0 "delegator does not forward private method" warning.
+        # Kernel#inspect calls instance_variables_to_inspect which, without 
this,
+        # triggers Delegator#respond_to_missing? for a private method.
+        define_method(:instance_variables_to_inspect, 
Kernel.instance_method(:instance_variables))
+
         def default_value?(value)
           value == coder.load(nil)
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/arel/predications.rb new/lib/arel/predications.rb
--- old/lib/arel/predications.rb        1980-01-02 01:00:00.000000000 +0100
+++ new/lib/arel/predications.rb        1980-01-02 01:00:00.000000000 +0100
@@ -231,9 +231,7 @@
     private
       def grouping_any(method_id, others, *extras)
         nodes = others.map { |expr| send(method_id, expr, *extras) }
-        Nodes::Grouping.new nodes.inject { |memo, node|
-          Nodes::Or.new([memo, node])
-        }
+        Nodes::Grouping.new Nodes::Or.new(nodes)
       end
 
       def grouping_all(method_id, others, *extras)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        1980-01-02 01:00:00.000000000 +0100
+++ new/metadata        1980-01-02 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: activerecord
 version: !ruby/object:Gem::Version
-  version: 8.0.3
+  version: 8.0.5
 platform: ruby
 authors:
 - David Heinemeier Hansson
@@ -15,28 +15,28 @@
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 8.0.3
+        version: 8.0.5
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 8.0.3
+        version: 8.0.5
 - !ruby/object:Gem::Dependency
   name: activemodel
   requirement: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 8.0.3
+        version: 8.0.5
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 8.0.3
+        version: 8.0.5
 - !ruby/object:Gem::Dependency
   name: timeout
   requirement: !ruby/object:Gem::Requirement
@@ -474,10 +474,10 @@
 - MIT
 metadata:
   bug_tracker_uri: https://github.com/rails/rails/issues
-  changelog_uri: 
https://github.com/rails/rails/blob/v8.0.3/activerecord/CHANGELOG.md
-  documentation_uri: https://api.rubyonrails.org/v8.0.3/
+  changelog_uri: 
https://github.com/rails/rails/blob/v8.0.5/activerecord/CHANGELOG.md
+  documentation_uri: https://api.rubyonrails.org/v8.0.5/
   mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
-  source_code_uri: https://github.com/rails/rails/tree/v8.0.3/activerecord
+  source_code_uri: https://github.com/rails/rails/tree/v8.0.5/activerecord
   rubygems_mfa_required: 'true'
 rdoc_options:
 - "--main"
@@ -495,7 +495,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.6.9
+rubygems_version: 4.0.6
 specification_version: 4
 summary: Object-relational mapper framework (part of Rails).
 test_files: []

Reply via email to