Skip to content

Use LEN2NUM for Digest::Instance#digest_length - #156

Merged
hsbt merged 1 commit into
masterfrom
claude/trusting-blackwell-c27cb2
Oct 11, 2026
Merged

hsbt merged 1 commit into
masterfrom
claude/trusting-blackwell-c27cb2

Conversation

@hsbt

@hsbt hsbt commented Oct 11, 2026

Copy link
Copy Markdown
Member

RSTRING_LEN returns rb_len_t on Ruby master, and LONG2NUM would truncate the length where rb_len_t is wider than long. This switches the default Digest::Instance#digest_length to LEN2NUM.

Rubies without rb_len_t fall back to LONG2NUM through HAVE_RB_LEN_T, so released versions behave as before.

https://bugs.ruby-lang.org/issues/22400

Generated with Claude Code

RSTRING_LEN returns rb_len_t, which LONG2NUM would truncate where rb_len_t is wider than long. The fallback keeps older Ruby building.

https://bugs.ruby-lang.org/issues/22400

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt requested a review from knu as a code owner October 11, 2026 01:18
@hsbt
hsbt merged commit 0c9a69b into master Oct 11, 2026
88 checks passed
@hsbt
hsbt deleted the claude/trusting-blackwell-c27cb2 branch October 11, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant