Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 11, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nobu and others added 4 commits January 11, 2026 17:09
RSTRUCT_LEN / RSTRUCT_GET / RSTRUCT_SET all existing in two
versions, one public that does type and frozens checks
and one private that doesn't.

The problem is that this is error prone because the public version
is always accessible, but the private one require to include
`internal/struct.h`. So you may have some code that rely on the
public version, and later on the private header is included and
changes the behavior.

This already led to introducing a bug in YJIT & ZJIT:
#15835
The version check used undefined macros, causing -Wundef warnings.
The conditional is no longer needed as Ruby is past version 3.1.
The 'w' format (BER compressed integer) was allocating an empty
string with rb_str_new(0, 0) then immediately overwriting it with
the correctly-sized allocation. Remove the wasted first allocation.

~50% improvement on BER pack benchmarks.
@pull pull bot locked and limited conversation to collaborators Jan 11, 2026
@pull pull bot added the ⤵️ pull label Jan 11, 2026
@pull pull bot merged commit a071078 into turkdevops:master Jan 11, 2026
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants