summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2025-11-06[ruby/openssl] digest: raise DigestError for unsupported algorithm nameKazuki Yamaguchi
We generally raise OpenSSL::OpenSSLError or its subclass for errors originating from the OpenSSL library, which may include extra details appended by ossl_raise(). https://github.com/ruby/openssl/commit/9427a05ce5
2025-11-06[DOC] Stop documentation for internalsNobuyoshi Nakada
Stop documentation for undocumented private constants and private class methods. And align private method definition styles. Also `Socket.tcp_with_fast_fallback` looks private as well as `Socket.tcp_without_fast_fallback`.
2025-11-06Dispatch by platform at loadNobuyoshi Nakada
`RUBY_PLATFORM` should be invariant within the same process.
2025-11-05[ruby/strscan] [DOC] no doc for internal methodsNobuyoshi Nakada
https://github.com/ruby/strscan/commit/5614095d9c
2025-11-05[ruby/strscan] Deprecate constant `Id`Nobuyoshi Nakada
`$Id$` is for RCS, CVS, and SVN; no information with GIT. https://github.com/ruby/strscan/commit/9e3db14fa2
2025-11-05[ruby/strscan] [DOC] Add document of StringScanner::ErrorNobuyoshi Nakada
https://github.com/ruby/strscan/commit/16ec901356
2025-11-05[ruby/strscan] Deprecate undocumented toplevel constant `ScanError`Nobuyoshi Nakada
https://github.com/ruby/strscan/commit/b4ddc3a2a6
2025-11-05[ruby/strscan] ISO C90 forbids mixed declarations and codeNobuyoshi Nakada
Cannot use C99 syntax, as far as supporting Ruby 2.6 and earlier. https://github.com/ruby/strscan/commit/f6d178fda5
2025-11-05[ruby/strscan] [DOC] Remove the statement `rest?` is obsoleteNobuyoshi Nakada
`eos?` is opposite, cannot be used instead of `rest?`. https://github.com/ruby/strscan/commit/bee8cc547b
2025-11-05[ruby/stringio] [DOC] Tweaks for StringIO#string=Burdette Lamar
(https://github.com/ruby/stringio/pull/172) https://github.com/ruby/stringio/commit/17ae4daf9a
2025-11-05[ruby/stringio] [DOC] Tweaks for StringIO#flushBurdette Lamar
(https://github.com/ruby/stringio/pull/169) https://github.com/ruby/stringio/commit/bef6541b55
2025-11-05[ruby/stringio] [DOC] Tweaks for StringIO#isattyBurdette Lamar
(https://github.com/ruby/stringio/pull/167) https://github.com/ruby/stringio/commit/94303ace95
2025-11-05[ruby/stringio] [DOC] Tweaks for StringIO#fsyncBurdette Lamar
(https://github.com/ruby/stringio/pull/170) https://github.com/ruby/stringio/commit/da338d7e5d
2025-11-05[ruby/stringio] [DOC] Tweaks for StringIO#filenoBurdette Lamar
(https://github.com/ruby/stringio/pull/168) https://github.com/ruby/stringio/commit/9f10c7ae86
2025-11-05[ruby/stringio] [DOC] Tweaks for StringIO#internal_encodingBurdette Lamar
(https://github.com/ruby/stringio/pull/166) https://github.com/ruby/stringio/commit/5eeb61df34
2025-11-04[ruby/stringio] [DOC] Doc for StringIO.getcBurdette Lamar
(https://github.com/ruby/stringio/pull/163) https://github.com/ruby/stringio/commit/a126fe252f
2025-11-04[ruby/strscan] Resurrect a method that has not been obsoleteTakashi Kokubun
(https://github.com/ruby/strscan/pull/169) Partially revert https://github.com/ruby/strscan/pull/168 because strscan_rest_p did not have `rb_warning("StringScanner#rest? is obsolete")`. It is actively used by the latest tzinfo.gem, and we shouldn't remove it without deprecating it. https://github.com/ruby/strscan/commit/f3fdf21189
2025-11-04[ruby/strscan] Remove methods have been obsolete over two decadesNobuyoshi Nakada
https://github.com/ruby/strscan/commit/1387def685
2025-11-04[ruby/strscan] Remove no longer used variableNobuyoshi Nakada
Since https://github.com/ruby/strscan/commit/92961cde2b42. https://github.com/ruby/strscan/commit/911f9c682a
2025-11-04[ruby/io-wait] bump up to 0.3.3Nobuyoshi Nakada
https://github.com/ruby/io-wait/commit/57bc0b752b
2025-11-04[ruby/json] Tentative fix for RHEL8 compilerJean Boussier
``` parser.c:87:77: error: missing binary operator before token "(" #if JSON_CPU_LITTLE_ENDIAN_64BITS && defined(__has_builtin) && __has_builtin(__builtin_bswap64) ``` https://github.com/ruby/json/commit/fce1c7e84a
2025-11-04[ruby/json] Micro-optimize `rstring_cache_fetch`Jean Boussier
Closes: https://github.com/ruby/json/pull/888 - Mark it as `inline`. - Use `RSTRING_GETMEM`, instead of `RSTRING_LEN` and `RSTRING_PTR`. - Use an inlinable version of `memcmp`. ``` == Parsing activitypub.json (58160 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Comparison: before: 11766.6 i/s after: 12272.1 i/s - 1.04x faster == Parsing twitter.json (567916 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Comparison: before: 1333.2 i/s after: 1422.0 i/s - 1.07x faster == Parsing citm_catalog.json (1727030 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Comparison: before: 656.3 i/s after: 673.1 i/s - 1.03x faster == Parsing float parsing (2251051 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Comparison: before: 276.8 i/s after: 276.4 i/s - same-ish: difference falls within error ``` https://github.com/ruby/json/commit/a67d1a1af4 Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-04[ruby/json] Extract `JSON_CPU_LITTLE_ENDIAN_64BITS` definitionJean Boussier
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[ruby/io-wait] Select packging files by pathspecsNobuyoshi Nakada
https://github.com/ruby/io-wait/commit/c66a90f5b1
2025-11-04[ruby/stringio] [DOC] Doc for StringIO#getsBurdette Lamar
(https://github.com/ruby/stringio/pull/164) https://github.com/ruby/stringio/commit/10e991e31d
2025-11-04[ruby/stringio] [DOC] Doc for StringIO#getbyteBurdette Lamar
(https://github.com/ruby/stringio/pull/162) https://github.com/ruby/stringio/commit/95a7dd592c
2025-11-04[ruby/stringio] [DOC] Tweaks for StringIO#external_encodingBurdette Lamar
(https://github.com/ruby/stringio/pull/161) https://github.com/ruby/stringio/commit/92656f5c66
2025-11-04[ruby/stringio] [DOC] Tweaks for StringIO#eof?Burdette Lamar
(https://github.com/ruby/stringio/pull/160) https://github.com/ruby/stringio/commit/5034156245
2025-11-03[ruby/json] ext/json/ext/json.h: Add missing newline at end of fileJean Boussier
https://github.com/ruby/json/commit/3bc1787bd4
2025-11-03[ruby/json] Fix duplicate 'inline' declaration specifierJean Boussier
Followup: https://github.com/ruby/json/pull/889 https://github.com/ruby/json/commit/591510392a
2025-11-03[ruby/json] Fix check_dependencyTakashi Kokubun
2025-11-03[ruby/json] parser.c: Always inline `json_eat_whitespace`Jean Boussier
``` == Parsing activitypub.json (58160 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 1.174k i/100ms Calculating ------------------------------------- after 11.756k (± 0.9%) i/s (85.06 μs/i) - 59.874k in 5.093438s Comparison: before: 11078.6 i/s after: 11756.1 i/s - 1.06x faster == Parsing twitter.json (567916 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 130.000 i/100ms Calculating ------------------------------------- after 1.340k (± 0.3%) i/s (746.06 μs/i) - 6.760k in 5.043432s Comparison: before: 1191.1 i/s after: 1340.4 i/s - 1.13x faster == Parsing citm_catalog.json (1727030 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 68.000 i/100ms Calculating ------------------------------------- after 689.451 (± 1.6%) i/s (1.45 ms/i) - 3.468k in 5.031470s Comparison: before: 630.3 i/s after: 689.5 i/s - 1.09x faster == Parsing float parsing (2251051 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 27.000 i/100ms Calculating ------------------------------------- after 248.265 (± 0.8%) i/s (4.03 ms/i) - 1.242k in 5.003185s Comparison: before: 232.7 i/s after: 248.3 i/s - 1.07x faster ``` https://github.com/ruby/json/commit/043880f6ab Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-03[ruby/json] parser.c: use `rb_str_to_interned_str` over `rb_funcall`Jean Boussier
https://github.com/ruby/json/commit/21284ea649
2025-11-03[ruby/json] parser.c: Extract `json_string_cacheable_p`Jean Boussier
We can share that logic between the two functions. https://github.com/ruby/json/commit/ac580458e0
2025-11-03[ruby/json] parser.c: simplify sorted insert loop in rstring_cache_fetchJean Boussier
https://github.com/ruby/json/commit/31453b8e95 Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-03[ruby/json] parser.c: Skip checking for escape sequences in ↵Jean Boussier
`rstring_cache_fetch` The caller already know if the string contains escape sequences so this check is redundant. Also stop calling `rstring_cache_fetch` from `json_string_unescape` as we know it won't match anyways. ``` == Parsing twitter.json (567916 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 122.000 i/100ms Calculating ------------------------------------- after 1.226k (± 0.3%) i/s (815.85 μs/i) - 6.222k in 5.076282s Comparison: before: 1206.2 i/s after: 1225.7 i/s - 1.02x faster ``` https://github.com/ruby/json/commit/b8cdf3282d Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-03[ruby/json] Centralize macro definitionsJean Boussier
https://github.com/ruby/json/commit/1576ea7d47
2025-11-02[ruby/json] Invoke `as_json` callback for strings with invalid encodingJean Boussier
Fix: https://github.com/ruby/json/issues/873 This allow users to encode binary strings if they so wish. e.g. they can use Base64 or similar, or chose to replace invalid characters with something else. https://github.com/ruby/json/commit/b1b16c416f
2025-11-01[ruby/json] Enable JSON_DEBUG for parser/extconf.rbJean Boussier
https://github.com/ruby/json/commit/82b030f294
2025-11-01[ruby/json] Enable JSON_DEBUG for parser/extconf.rbJean Boussier
https://github.com/ruby/json/commit/3ea744ad67
2025-11-01[ruby/json] parser.c: Appease GCC warningJean Boussier
``` ../../../../../../ext/json/ext/parser/parser.c:1142:40: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 1142 | if (RB_UNLIKELY(first_digit == '0' && mantissa_digits > 1 || negative && mantissa_digits == 0)) { | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ``` https://github.com/ruby/json/commit/ded62a5122
2025-11-01[ruby/json] parser.c: Use SWAR to skip consecutive spacesJean Boussier
Closes: https://github.com/ruby/json/pull/881 If we encounter a newline, it is likely that the document is pretty printed, hence that the newline is followed by multiple spaces. In such case we can use SWAR to count up to eight consecutive spaces at once. ``` == Parsing activitypub.json (58160 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 1.118k i/100ms Calculating ------------------------------------- after 11.223k (± 0.7%) i/s (89.10 μs/i) - 57.018k in 5.080522s Comparison: before: 10834.4 i/s after: 11223.4 i/s - 1.04x faster == Parsing twitter.json (567916 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 118.000 i/100ms Calculating ------------------------------------- after 1.188k (± 1.0%) i/s (841.62 μs/i) - 6.018k in 5.065355s Comparison: before: 1094.8 i/s after: 1188.2 i/s - 1.09x faster == Parsing citm_catalog.json (1727030 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 58.000 i/100ms Calculating ------------------------------------- after 570.506 (± 3.7%) i/s (1.75 ms/i) - 2.900k in 5.091529s Comparison: before: 419.6 i/s after: 570.5 i/s - 1.36x faster == Parsing float parsing (2251051 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 22.000 i/100ms Calculating ------------------------------------- after 212.010 (± 1.9%) i/s (4.72 ms/i) - 1.078k in 5.086885s Comparison: before: 189.4 i/s after: 212.0 i/s - 1.12x faster ``` https://github.com/ruby/json/commit/b3fd7b26be Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-01[ruby/json] Use SWAR for parsing integers on little endian machinesJean Boussier
Closes: https://github.com/ruby/json/pull/878 ``` == Parsing float parsing (2251051 bytes) ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- after 23.000 i/100ms Calculating ------------------------------------- after 214.382 (± 0.5%) i/s (4.66 ms/i) - 1.081k in 5.042555s Comparison: before: 189.5 i/s after: 214.4 i/s - 1.13x faster ``` https://github.com/ruby/json/commit/6348ff0891 Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-01[ruby/json] parser.c: Introduce `rest()` helperJean Boussier
https://github.com/ruby/json/commit/11f4e7b7be
2025-11-01[ruby/json] parser.c: Introduce `peek()` and `eos()` helpersJean Boussier
Encapsulate pointer arithmetic to reduce possibility of mistakes. https://github.com/ruby/json/commit/8b39407225
2025-11-01[ruby/json] parser.c: Extract json_parse_digitsJean Boussier
https://github.com/ruby/json/commit/1bf405ecc6
2025-11-01[ruby/json] parser.c: Extract `json_parse_number`Jean Boussier
https://github.com/ruby/json/commit/2681b23b87
2025-10-31[ruby/json] Fix memory leak when exception is raised during JSON generation ↵Kazuki Yamaguchi
part 2 Commit https://github.com/ruby/json/commit/44df509dc2de fixed it for StandardError, but other exceptions and jumps are also possible. Use rb_ensure() to release FBuffer instead of rb_rescue(). A reproducer: o = Object.new def o.to_json(a) = throw :a a = ["make heap allocation"*100, o] 10.times do 100_000.times do catch(:a) { JSON(a) } end puts `ps -o rss= -p #{$$}` end https://github.com/ruby/json/commit/9b7b648ecd
2025-10-31[ruby/digest] v3.2.1Hiroshi SHIBATA
https://github.com/ruby/digest/commit/687e7cc1e1
2025-10-31[ruby/win32-registry] v0.1.1Hiroshi SHIBATA
https://github.com/ruby/win32-registry/commit/6d8a43a890