Test both ends of the activesupport range, not just one - #17
Merged
Merged
Conversation
activesupport below 8.1 encodes JSON with JSON.generate(..., quirks_mode: true), and json 3 removed that keyword, so any hash.to_json raises ArgumentError on that pair. The gemspec allows activesupport >= 7.0, so both ends need covering rather than whichever the lockfile happens to hold. The Gemfile takes both versions from ACTIVESUPPORT_VERSION and JSON_VERSION, defaulting to the modern pair, and CI runs a matrix over activesupport >= 8.1 with json 3 and activesupport ~> 7.2 with json 2. The README states the incompatible pair, since it affects anyone loading active_support/core_ext, not only this gem. Same change as buildio/idrac#26.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the fix from buildio/idrac#26 after finding the same exposure here.
ActiveSupport::JSON::Encoding::JSONGemEncoder#stringifycallsJSON.generate(..., quirks_mode: true); json 3 removed the keyword. activesupport 8.1 is the first release that stopped passing it, so activesupport 7.x + json 3 raisesArgumentError: unknown keyword: quirks_modeon anyhash.to_json— at runtime, not just in specs.This gemspec allows
activesupport >= 7.0, so the combination is reachable for users; the lockfile just happened to sit on a working pair. CI now covers both ends:Both green locally. README documents the pair. Gemfile, workflow and docs only — no release needed.