Repository navigation
Conversation
JSON 3 drops create_additions keyword from JSON.load, making it crash with NameError in Colors::ColormapRegistry.load_colormap_data . Locking to working version is the safest first step
kou
pushed a commit
that referenced
this pull request
Sep 8, 2026
### Problem [json v3](https://github.com/ruby/json/releases/tag/v3.0.0) removes `create_additions` option from `JSON.load`, raising `NameError` in [Colors::ColormapRegistry.load_colormap_data](https://github.com/red-data-tools/red-colors/blob/36492692b3d78f64b1cc5e20f77058b35803ebc4/lib/colors/colormap_data.rb#L15) ### Solution `JSON.load` seems like `JSON.parse` with some extra no-op steps, making `JSON.parse` more appropriate here ### Notes The safest fix is [locking json version](#29). This PR is a direct fix, slightly more invasive but still relatively safe. ### References - [source of JSON.load (v2.21.2)](https://github.com/ruby/json/blob/5a32e4367ca5976f62af12887a09685b7109b054/lib/json/common.rb#L865-L902)
Member
|
I close this in favor of #30. |
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.
json v3 drops
create_additionskeyword fromJSON.load, making it crash withNameErrorin Colors::ColormapRegistry.load_colormap_data .Locking to a working version is the safest/most obvious first step