Skip to content

Keep json on 2.x for Ruby < 3.2 - #153

Merged
mtsmfm merged 1 commit into
mainfrom
fix-json-3-on-old-rubies
Sep 16, 2026
Merged

mtsmfm merged 1 commit into
mainfrom
fix-json-3-on-old-rubies

Conversation

@mtsmfm

@mtsmfm mtsmfm commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Ruby 2.7 to 3.1 cannot use the locked activesupport 8.1, so bundler re-resolves them to activesupport < 8.1, which still passes quirks_mode: true to JSON.generate. json 3.0 (released 2026-09-07) raises ArgumentError for unknown options, which broke the -r active_support/all example test on those Rubies:

ArgumentError: unknown keyword: quirks_mode
    json-3.0.2/lib/json/common.rb:382:in `generate'
    activesupport-7.1.6/lib/active_support/json/encoding.rb:92:in `stringify'

Ruby 2.7 to 3.1 cannot use the locked activesupport 8.1, so bundler
re-resolves them to activesupport < 8.1, which still passes
`quirks_mode: true` to JSON.generate. json 3.0 (released 2026-09-07)
raises ArgumentError for unknown options, which broke the
`-r active_support/all` example test on those Rubies:

    ArgumentError: unknown keyword: quirks_mode
        json-3.0.2/lib/json/common.rb:382:in `generate'
        activesupport-7.1.6/lib/active_support/json/encoding.rb:92:in `stringify'

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mtsmfm
mtsmfm force-pushed the fix-json-3-on-old-rubies branch from 4820a23 to 62a8836 Compare September 16, 2026 02:34
@mtsmfm
mtsmfm marked this pull request as ready for review September 16, 2026 02:48
@mtsmfm
mtsmfm merged commit 2da783b into main Sep 16, 2026
24 checks passed
@mtsmfm
mtsmfm deleted the fix-json-3-on-old-rubies branch September 16, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant