summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2025-06-11[ruby/date] Update zonetab.h at 2025-06-11Nobuyoshi Nakada
https://github.com/ruby/date/commit/b28617cde0
2025-06-07Get rid of SHAPE_T_OBJECTJean Boussier
Now that we have the `heap_index` in shape flags we no longer need `T_OBJECT` shapes. Notes: Merged: https://github.com/ruby/ruby/pull/13556
2025-06-06Bump up strscan version to 3.1.6.devHiroshi SHIBATA
2025-06-06[ruby/strscan] Implement Write BarrierDaniel Colson
(https://github.com/ruby/strscan/pull/156) StringScanner holds the string being scanned, and a regex for methods like `match?`. Triggering the write barrier for those allows us to mark this as WB protected. https://github.com/ruby/strscan/commit/32fec70407
2025-06-05[ruby/date] Suppress warnings by gcc-13 with `-Og`Nobuyoshi Nakada
https://github.com/ruby/date/commit/6dd7969a64
2025-06-05Suppress warnings by gcc-13 with `-Og`Nobuyoshi Nakada
2025-06-05[ruby/stringio] Extract internal part as the functionNobuyoshi Nakada
`str_chilled_p` (https://github.com/ruby/stringio/pull/136) https://github.com/ruby/stringio/commit/3c52ddc4c8
2025-06-04Implement write barrier for addrinfoDaniel Colson
`rb_addrinfo_t` has `VALUE inspectname` and `VALUE canonname`, so this triggers the write barrier for those. The `AddrInfo` wasn't readily available where we need to call `RB_OBJ_WRITE`, so this involves passing `self` around a bit. Notes: Merged: https://github.com/ruby/ruby/pull/13503
2025-06-04Get rid of TOO_COMPLEX shape typeJean Boussier
Instead it's now a `shape_id` flag. This allows to check if an object is complex without having to chase the `rb_shape_t` pointer. Notes: Merged: https://github.com/ruby/ruby/pull/13511
2025-06-04Get rid of frozen shapes.Jean Boussier
Instead `shape_id_t` higher bits contain flags, and the first one tells whether the shape is frozen. This has multiple benefits: - Can check if a shape is frozen with a single bit check instead of dereferencing a pointer. - Guarantees it is always possible to transition to frozen. - This allow reclaiming `FL_FREEZE` (not done yet). The downside is you have to be careful to preserve these flags when transitioning. Notes: Merged: https://github.com/ruby/ruby/pull/13289
2025-05-27Get rid of `rb_shape_id(rb_shape_t *)`Jean Boussier
We should avoid conversions from `rb_shape_t *` into `shape_id_t` outside of `shape.c` as the short term goal is to have `shape_id_t` contain tags. Notes: Merged: https://github.com/ruby/ruby/pull/13448
2025-05-26[ruby/json] Release 2.12.2Jean Boussier
https://github.com/ruby/json/commit/a29cb77d52
2025-05-26[ruby/json] Release 2.12.1Jean Boussier
https://github.com/ruby/json/commit/8603a57a91
2025-05-26[ruby/json] fbuffer.c: add debug mode with bound checks.Jean Boussier
This would have caught https://github.com/ruby/json/pull/808 on CI. https://github.com/ruby/json/commit/8109421fb4
2025-05-26[ruby/json] Fix: generate_json_float to reserve enough memory for large ↵Jean Boussier
negative floats. Fix: https://github.com/ruby/json/issues/807 Since https://github.com/ruby/json/pull/800, `fpconv_dtoa` can actually generate up to 28 chars. https://github.com/ruby/json/commit/d73ae93d3c
2025-05-20Make Addrinfo objects Ractor shareableAaron Patterson
Allow Addrinfo objects to be shared among Ractors. Addrinfo objects are already immutable, so I think it's safe for us to tag them as RUBY_TYPED_FROZEN_SHAREABLE shareable too. Notes: Merged: https://github.com/ruby/ruby/pull/13388
2025-05-19[ruby/json] Remove some unnecessary top level constant lookupsJean Boussier
https://github.com/ruby/json/commit/7c03ffc3e0
2025-05-19[ruby/json] remove redundant `self.`GrantBirki
https://github.com/ruby/json/commit/c060943d04
2025-05-19[ruby/json] use `.` over `::` for consistencyGrantBirki
https://github.com/ruby/json/commit/f5c1b8c45d
2025-05-19[ruby/json] fix for pretty_generate throwing wrong number of arguments errorCody Horton
https://github.com/ruby/json/commit/8433571dcf
2025-05-15[ruby/openssl] ssl: fix potential memory leak in SSLContext#setupKazuki Yamaguchi
If SSL_CTX_add_extra_chain_cert() fails, the refcount of x509 must be handled by the caller. This should only occur due to a malloc failure inside the function. https://github.com/ruby/openssl/commit/80bcf727dc
2025-05-15[ruby/openssl] cipher: remove Cipher#encrypt(password, iv) formKazuki Yamaguchi
OpenSSL::Cipher#encrypt and #decrypt have long supported a hidden feature to derive a key and an IV from the String argument, but in an inappropriate way. This feature is undocumented, untested, and has been deprecated since commit https://github.com/ruby/ruby/commit/0dc43217b189 on 2004-06-30, which started printing a non-verbose warning. More than 20 years later, it must be safe to remove it entirely. The deprecated usage: # `password` is a String, `iv` is either a String or nil cipher = OpenSSL::Cipher.new("aes-256-cbc") cipher.encrypt(password, iv) p cipher.update("data") << cipher.final was equivalent to: cipher = OpenSSL::Cipher.new("aes-256-cbc") cipher.encrypt iv ||= "OpenSSL for Ruby rulez!" key = ((cipher.key_len + 15) / 16).times.inject([""]) { |ary, _| ary << OpenSSL::Digest.digest("MD5", ary.last + password + iv[0, 8].ljust(8, "\0")) }.join cipher.key = key[...cipher.key_len] cipher.iv = iv[...cipher.iv_len].ljust(cipher.iv_len, "\0") p cipher.update("data") << cipher.final https://github.com/ruby/openssl/commit/e46d992ea1
2025-05-15Ensure shape_id is never used on T_IMEMOJean Boussier
It doesn't make sense to set ivars or anything shape related on a T_IMEMO. Co-Authored-By: John Hawthorn <john@hawthorn.email> Notes: Merged: https://github.com/ruby/ruby/pull/13347
2025-05-13[ruby/stringio] Add a comment to explicit RUBY_FL_USER2 |Jean Boussier
RUBY_FL_USER3 (https://github.com/ruby/stringio/pull/133) This way when someone removes these flags from Ruby or update them, they'll find this reference when greping. Followup: https://github.com/ruby/stringio/pull/128 https://github.com/ruby/stringio/commit/fad26ee14b
2025-05-13Make `waiting_fd` behaviour per-IO. (#13127)Samuel Williams
- `rb_thread_fd_close` is deprecated and now a no-op. - IO operations (including close) no longer take a vm-wide lock. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2025-05-13[ruby/json] Further improve parsing errorsJean Boussier
Report EOF when applicable instead of an empty fragment. Also stop fragment extraction on first whitespace. https://github.com/ruby/json/commit/cc1daba860 Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-13[ruby/json] Add missing single quotes in error messagesJean Boussier
https://github.com/ruby/json/commit/f3dde3cb2f Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-13[ruby/json] Release 2.12.0Jean Boussier
https://github.com/ruby/json/commit/41f1f6939d Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-13[ruby/json] parser.c: include line and column in error messagesJean Boussier
https://github.com/ruby/json/commit/30e35b9ba5 Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-13[ruby/json] parser.c: refactor `raise_parse_error` to have document startJean Boussier
https://github.com/ruby/json/commit/832b5b1a4c Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-12Add a missing dependency for stringioTakashi Kokubun
18d395e0784401585b5c14300e689de55e208647
2025-05-13[ruby/stringio] Fix Ruby 3.4 checkJeremy Evans
https://github.com/ruby/stringio/commit/a27c5d5e2e Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
2025-05-13[ruby/stringio] Do not issue warning when calling set_encoding if string is ↵Jeremy Evans
chilled StringIO does not warn for unchilled unfrozen string or for frozen string, so it should not warn for chilled string. https://github.com/ruby/stringio/commit/4ac33b8c70
2025-05-12[ruby/psych] Bump version for releaseAaron Patterson
https://github.com/ruby/psych/commit/b9dec9f811
2025-05-12[ruby/psych] Fix dumping `StringIO` (and potentially others) on Ruby <= 2.7Earlopain
In Ruby < 3.0, the superclass of StringIO was actually already `Data`, but it doesn't have the expected shape. So, on these earlier versions it errors: > NoMethodError: undefined method `members' for #<StringIO:0x00005641dd5f2880> > vendor/bundle/ruby/2.6.0/gems/psych-5.2.5/lib/psych/visitors/yaml_tree.rb:170:in `visit_Data' This test doesn't fail on 2.7, presumably because it can pull in a newer `stringio` version. https://github.com/ruby/psych/commit/0f40f56268
2025-05-12[ruby/erb] [DOC] Make documentation 100%Nobuyoshi Nakada
https://github.com/ruby/erb/commit/9152ce8db4
2025-05-12Explicit cast down from `double` to `int`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13304
2025-05-12[ruby/json] Favor decimal notation over scientific notation for floatsJean Boussier
e.g. ``` JSON.dump(1746861937.7842371) ``` master: ``` "1.https://github.com/ruby/json/commit/746861937784+9" ``` This branch and older json versions: ``` https://github.com/ruby/json/commit/1746861937.7842371 ``` In the end it's shorter, and according to `canada.json` benchmark performance is the same. https://github.com/ruby/json/commit/866f72a437
2025-05-11Update common.mk dependenciesYusuke Endoh
2025-05-11namespace on readSatoshi Tagomori
2025-05-09[ruby/psych] Bump version for releaseAaron Patterson
https://github.com/ruby/psych/commit/dbf9e36583
2025-05-09[ruby/psych] add first test for safe load streamOrenGitHub
https://github.com/ruby/psych/commit/336553b412
2025-05-09[ruby/psych] fixed bugs from testingOrenGitHub
https://github.com/ruby/psych/commit/e954f96639
2025-05-09[ruby/psych] Add safe version for load_streamOrenGitHub
https://github.com/ruby/psych/commit/30a2a5ee94
2025-05-09Rename `RB_OBJ_SHAPE` -> `rb_obj_shape`Jean Boussier
As well as `RB_OBJ_SHAPE_ID` -> `rb_obj_shape_id` and `RSHAPE` is now a simple alias for `rb_shape_lookup`. I tried to turn all these into `static inline` but I'm having trouble with `RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;` not being exposed as I'd expect. Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Rename `rb_shape_get_shape_id` -> `RB_OBJ_SHAPE_ID`Jean Boussier
And `rb_shape_get_shape` -> `RB_OBJ_SHAPE`. Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Rename `rb_shape_obj_too_complex` -> `rb_shape_obj_too_complex_p`Jean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Refactor `rb_shape_depth` to take an ID rather than a pointer.Jean Boussier
As well as `rb_shape_edges_count` and `rb_shape_memsize`. Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Support `require 'cgi/escape'` with extracting CGI::Escape from CGI::UtilHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-05-08Add depend files under ext/-test-Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13272