From 1e107ea77298e7f27b59bc57d126464cfbbd8555 Mon Sep 17 00:00:00 2001 From: Shinji Nakamatsu <19329+snaka@users.noreply.github.com> Date: Sun, 27 Sep 2026 10:30:57 +0900 Subject: [PATCH] Pin json below 3.0 for the test suite json 3.0.0 removed the quirks_mode option, but ActiveSupport 7.2.3.x still passes it to JSON.generate. Once ActiveSupport's JSON extensions are loaded, Hash#to_json raises "ArgumentError: unknown keyword: quirks_mode". In the test suite ActiveSupport is only loaded when spec/persistence/cookie_adapter_spec.rb requires "rails", so specs that serialize JSON fail only when that file runs earlier in the random order. ActiveSupport 7.2.4 no longer passes quirks_mode, but it caps connection_pool below 3. On Ruby >= 3.2, Bundler resolves connection_pool 3.x with ActiveSupport 7.2.3.2 instead, so the affected jobs are Ruby >= 3.2 with Rails 7.x. Ruby 3.1 resolves ActiveSupport 7.2.4, and Rails 8.x does not pass quirks_mode either. This only affects the development Gemfile, not the gemspec. Co-Authored-By: Claude Opus 5.5 --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 75ee759f..52472434 100644 --- a/Gemfile +++ b/Gemfile @@ -7,5 +7,7 @@ gemspec gem "rubocop", require: false gem "codeclimate-test-reporter" gem "concurrent-ruby", "< 1.3.9" +# json 3.0 dropped the quirks_mode option that ActiveSupport 7.2.3.x still passes +gem "json", "< 3" gem "rails", "~> #{ENV.fetch('RAILS_VERSION', '8.0')}"