-
Notifications
You must be signed in to change notification settings - Fork 354
Comparing changes
Open a pull request
base repository: ruby/json
base: master
head repository: ruby/json
compare: v2.7.x
- 20 commits
- 15 files changed
- 1 contributor
Commits on Oct 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c2cd953 - Browse repository at this point
Copy the full SHA c2cd953View commit details -
Workaround rubygems $LOAD_PATH bug
Ref: #647 Ref: ruby/rubygems#6490 Older rubygems are executing `extconf.rb` with a broken `$LOAD_PATH` causing the `json` gem native extension to be loaded with the stdlib version of the `.rb` files. This fails with ``` json/common.rb:82:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError) ``` Since this is just for `extconf.rb` we can probably just accept that extra argument and ignore it. The bug was fixed in rubygems 3.4.9 / 2023-03-20
Configuration menu - View commit details
-
Copy full SHA for a0cd1de - Browse repository at this point
Copy the full SHA a0cd1deView commit details -
Workaround being loaded alongside a different
json_pureversionFix: #646 Since both `json` and `json_pure` expose the same files, if the versions don't match, the native extension may be loaded with Ruby code that don't match and is incompatible. By doing the `require json/ext/generator/state` from C we ensure we're at least loading that. But this is a dirty workaround for the 2.7.x branch, we should find a better way to fully isolate the two gems.
Configuration menu - View commit details
-
Copy full SHA for 7fd3531 - Browse repository at this point
Copy the full SHA 7fd3531View commit details -
json_pure: fix ractor compatibility
This actually never worked, because the test was always testing the ext version from the stdlib, never the pure version nor the current ext version.
Configuration menu - View commit details
-
Copy full SHA for e285489 - Browse repository at this point
Copy the full SHA e285489View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10981db - Browse repository at this point
Copy the full SHA 10981dbView commit details -
Merge pull request #648 from casperisfine/v2.7-rubygems-workaround
Workaround rubygems $LOAD_PATH bug
Configuration menu - View commit details
-
Copy full SHA for 9e9b749 - Browse repository at this point
Copy the full SHA 9e9b749View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31a9100 - Browse repository at this point
Copy the full SHA 31a9100View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4af0ea5 - Browse repository at this point
Copy the full SHA 4af0ea5View commit details -
Merge pull request #652 from byroot/v2.7.x-pure-compat
Instantiate Parser with a kwsplat
Configuration menu - View commit details
-
Copy full SHA for 04b43d2 - Browse repository at this point
Copy the full SHA 04b43d2View commit details
Commits on Oct 28, 2024
-
Handle all formatting configs potentially being
nil.Fix: #653 I don't think this was really fully supported in the past, but it kinda worked with some of the implementations.
Configuration menu - View commit details
-
Copy full SHA for c318928 - Browse repository at this point
Copy the full SHA c318928View commit details -
Merge pull request #654 from casperisfine/v2.7.x-handle-nil-configs
Handle all formatting configs potentially being `nil`.
Configuration menu - View commit details
-
Copy full SHA for 9d71186 - Browse repository at this point
Copy the full SHA 9d71186View commit details
Commits on Oct 30, 2024
-
Fix a memory leak in #to_json methods
Fix: #460 The various `to_json` methods must rescue exceptions to free the buffer. ``` require 'json' data = 10_000.times.to_a << BasicObject.new 20.times do 100.times do begin data.to_json rescue NoMethodError end end puts `ps -o rss= -p #{$$}` end ``` ``` 20128 24992 29920 34672 39600 44336 49136 53936 58816 63616 68416 73232 78032 82896 87696 92528 97408 102208 107008 111808 ```
Configuration menu - View commit details
-
Copy full SHA for 84c9aaa - Browse repository at this point
Copy the full SHA 84c9aaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 15afc68 - Browse repository at this point
Copy the full SHA 15afc68View commit details
Commits on Oct 31, 2024
-
JSON.generate: call to_json on String subclasses
Fix: #667 This is yet another behavior on which the various implementations differed, but the C implementation used to call `to_json` on String subclasses used as keys. This was optimized out in e125072 but there is an Active Support test case for it, so it's best to make all 3 implementation respect this behavior.
Configuration menu - View commit details
-
Copy full SHA for 045e58d - Browse repository at this point
Copy the full SHA 045e58dView commit details
Commits on Nov 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a0d6591 - Browse repository at this point
Copy the full SHA a0d6591View commit details -
Configuration menu - View commit details
-
Copy full SHA for e08d222 - Browse repository at this point
Copy the full SHA e08d222View commit details
Commits on Nov 4, 2024
-
Merge pull request #679 from casperisfine/generator-custom-base-types
Add tests for the behavior of JSON.generate with base types subclasses
Configuration menu - View commit details
-
Copy full SHA for 987f59d - Browse repository at this point
Copy the full SHA 987f59dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3a3695 - Browse repository at this point
Copy the full SHA e3a3695View commit details
Commits on Nov 5, 2024
-
Raise JSON::GeneratorError instead of Encoding::UndefinedConversionError
Followup: #633 That's what was raised historically. You could argue that this new exception is more precise, but I've encountered some real production code that expected the old behavior and that was broken by this change.
Configuration menu - View commit details
-
Copy full SHA for 2f76147 - Browse repository at this point
Copy the full SHA 2f76147View commit details -
Merge pull request #684 from byroot/v2.7.x-encoding-error
[2.7.x] Raise JSON::GeneratorError instead of Encoding::UndefinedConversionError
Configuration menu - View commit details
-
Copy full SHA for 41cadbb - Browse repository at this point
Copy the full SHA 41cadbbView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...v2.7.x