Similar to f3206cc79b but for TypedData.
It's quite common for TypedData objects to have a mix of reference in
their struct and some ivars.
Since we do happen to have 8B free in the RtypedData struct, we could
use it to keep a direct reference to the IMEMO/fields saving having
to synchronize the VM and lookup the `gen_fields_tbl` on every ivar
access.
For old school Data classes however, we don't have free space, but
this API is soft-deprecated and no longer very common.
This saves one pointer in `struct set_table`, which would allow
`Set` objects to still fit in 80B TypedData slots even if RTypedData
goes from 32B to 40B large.
The existing set benchmark seem to show this doesn't have a very
significant impact. Smaller sets are a bit faster, larger sets
a bit slower.
It seem consistent over multiple runs, but it's unclear how much
of that is just error margin.
```
compare-ruby: ruby 3.5.0dev (2025-08-12T02:14:57Z master 428937a536) +YJIT +PRISM [arm64-darwin24]
built-ruby: ruby 3.5.0dev (2025-08-12T07:22:26Z set-entries-bounds da30024fdc) +YJIT +PRISM [arm64-darwin24]
warming up........
| |compare-ruby|built-ruby|
|:------------------------|-----------:|---------:|
|new_0 | 15.459M| 15.823M|
| | -| 1.02x|
|new_10 | 3.484M| 3.574M|
| | -| 1.03x|
|new_100 | 546.992k| 564.679k|
| | -| 1.03x|
|new_1000 | 49.391k| 48.169k|
| | 1.03x| -|
|aref_0 | 18.643M| 19.350M|
| | -| 1.04x|
|aref_10 | 5.941M| 6.006M|
| | -| 1.01x|
|aref_100 | 822.197k| 814.219k|
| | 1.01x| -|
|aref_1000 | 83.230k| 79.411k|
| | 1.05x| -|
```
In OpenSSL's master branch, importing/loading a key in the FIPS mode
automatically performs a pair-wise consistency check. This breaks tests
for OpenSSL::PKey::EC#check_key and DH#params_ok? as they use
deliberately invalid keys. These methods would not be useful in the
FIPS mode anyway.
Fixes https://github.com/ruby/openssl/issues/92625ad8f4bdb
This only adds the rbimpl_ version to include/ruby/atomic.h so that it
is not a new public interface.
We were already using RUBY_ATOMIC_VALUE_LOAD in a few locations. This
will allow us to use other memory orders internally when desired.
"store" is the terminology the C11 standard uses, which allows us to use
this as a fallback.
This only changes the private rbimpl_ version of the method,
RUBY_ATOMIC_SET et al. keep the same name.
Add the s390x case using GitHub Actions ppc64le/s390x service.
https://github.com/IBM/actionspz
We can run the ppc64le/s390x cases only in the registered upstream repositories.
https://github.com/IBM/actionspz/blob/main/docs/FAQ.md#what-about-forked-repos
The following matrix upstream logic is to skip the ppc64le/s390x in the
downstream (fork) repositories.
```
+ upstream:
+ - ${{ github.repository == 'ruby/ruby' }}
```
Use the "os" list to determine the excluded ppc64le/s390x cases by using the
"exclude" syntax. Because the "exclude" syntax are executed before the
"include" syntax.
Add the ubuntu-24.04-ppc64le as a comment, because the GitHub Actions ppc64le
case has the following test errors and failures.
https://bugs.ruby-lang.org/issues/21534
NMake combines VPATH and stem with a backslash. The resulting source
name is embedded verbatim, backslash included, into the generated file
using the `#line` pragma (e.g., "src\gc.rb"). This causes the warning
"C4129: Unrecognized character escape sequence".
Rust PRs will have a failed CI step if they trigger any warnings.
This helps us stay on top of warnings from new Rust releases and
also ones we accidentally write.
Fix a typo for demo, since this only runs when Rust files are changed.
gc_config_set returned rb_gc_impl_config_get, but gc_config_get also added
the implementation key to the return value. This caused the return value
of GC.config to differ depending on whether the optional hash argument is
provided or not.