17 Commits
Author SHA1 Message Date
Hiroshi SHIBATAandClaude Opus 5.5 87e6f05163 Use rb_len_t for String lengths and positions in json
The column of a parse error is a character position in the source, so it follows them while the line number stays long. It falls back to long on Ruby versions that do not define HAVE_RB_LEN_T.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:10:53 +09:00
Jean Boussier ac60d4ae4d [ruby/json] Make generator options strict
https://github.com/ruby/json/commit/a8d7f6da6b
2026-08-11 08:12:51 +00:00
Jean Boussier a746dd8374 [ruby/json] Declare types as RUBY_TYPED_THREAD_SAFE_FREE
Ref: https://github.com/ruby/ruby/pull/17395

https://github.com/ruby/json/commit/fa69e94b66
2026-06-25 06:37:32 +00:00
Jean Boussier d57e5f41a1 [ruby/json] Cleanup the rb_catch_obj workaround
Followup: https://github.com/ruby/json/pull/1031

Now that the bug has been fixed upstream, we can only apply
it on unpatched version.

Also refactor the workaround to expose the exact same API
as `rb_catch_obj`, making it easier to ignore and remove later.

https://github.com/ruby/json/commit/2afd1a9a61
2026-06-21 08:25:05 +00:00
Jean Boussier c2879d4eb1 [ruby/json] Implement JSON::ResumableParser
Only available on MRI for now.

https://github.com/ruby/json/commit/2b908f6f26
2026-06-15 10:28:20 +00:00
Jean Boussier c332b80bfe [ruby/json] Compile UNREACHABLE_RETURN into rb_bug when in debug mode
This makes it much easier to debug.

https://github.com/ruby/json/commit/bbcf0a3254
2026-06-07 08:13:41 +00:00
Jean Boussier 8fefa5537c [ruby/json] Integrate with Ruby 4.1 ruby_sized_xfree
Ensure that buffer sizes have been properly tracked when running
in debug mode, and appease the GC slightly when running in release
mode.

Ref: https://bugs.ruby-lang.org/issues/21861

https://github.com/ruby/json/commit/90354007ea
2026-06-03 07:33:28 +00:00
Jean Boussier 60116d5ee1 [ruby/json] Use embeddable types
Ref: https://bugs.ruby-lang.org/issues/21853

Introduced in Ruby 3.3, will officially be public API in 4.1,
but can be used sooner by checking the existence of RUBY_TYPED_EMBEDDABLE

https://github.com/ruby/json/commit/101f7342cd
2026-03-24 07:35:33 +00:00
Jean Boussier e832057ad3 [ruby/json] Revert use of RUBY_TYPED_EMBEDDABLE
https://github.com/ruby/json/commit/8364dbd491
2026-03-23 21:27:51 +00:00
Jean Boussier 2a3a651840 [ruby/json] Fix Ruby 4.1.0dev compatibility
https://github.com/ruby/json/commit/4e2173d7c8
2026-03-23 20:57:19 +00:00
Jean Boussier f23ffd5bef [ruby/json] Use embeddable types
Ref: https://bugs.ruby-lang.org/issues/21853

Introduced in Ruby 3.3, will officially be public API in 4.1,
but can be used sooner by checking the existence of RUBY_TYPED_EMBEDDABLE

https://github.com/ruby/json/commit/89fe63069d
2026-03-23 20:39:05 +00:00
Jean Boussier 17caec3cab [ruby/json] Cleanup function delecarations
https://github.com/ruby/json/commit/7ddf3499d0
2026-02-06 08:48:29 +00:00
Jean Boussier 3164d4e8a2 [ruby/json] Extract json_fast_memcpy16 for readability
https://github.com/ruby/json/commit/1b276c8623
2026-01-16 17:52:54 +00:00
Étienne Barrié ffa105c27f [ruby/json] Move RUBY_TYPED_FROZEN_SHAREABLE macro to json.h
https://github.com/ruby/json/commit/2a4ebe8250
2025-11-21 16:12:35 +00:00
Jean Boussier 157ae44b1e [ruby/json] Extract JSON_CPU_LITTLE_ENDIAN_64BITS definition
Only apply these definitions on 64 bits archs, as it's unclear
if they have performance benefits or compatibility issues on
32bit archs.

https://github.com/ruby/json/commit/ddad00b746
2025-11-04 08:49:57 +00:00
Jean Boussier 505fcf5dcf [ruby/json] ext/json/ext/json.h: Add missing newline at end of file
https://github.com/ruby/json/commit/3bc1787bd4
2025-11-03 17:02:42 +00:00
Jean Boussier 35a5e55133 [ruby/json] Centralize macro definitions
https://github.com/ruby/json/commit/1576ea7d47
2025-11-03 09:22:40 +00:00