Skip to content

Use rb_len_t for String lengths in cgi/escape - #138

Merged
hsbt merged 1 commit into
masterfrom
claude/fervent-pare-2991fb
Oct 11, 2026
Merged

hsbt merged 1 commit into
masterfrom
claude/fervent-pare-2991fb

Conversation

@hsbt

@hsbt hsbt commented Oct 10, 2026

Copy link
Copy Markdown
Member

This ports ruby/ruby@939f20c79d from ruby/ruby#19288, which switched the String lengths in cgi/escape to rb_len_t. After this, ext/cgi/escape/escape.c is identical to the one in ruby/ruby master.

Ruby versions that do not define HAVE_RB_LEN_T get rb_len_t as a typedef of long, so nothing changes there. I ran bundle exec rake test with mswin builds of Ruby 3.3, 3.4, 4.0 and a 4.1.0dev snapshot that defines HAVE_RB_LEN_T.

Generated with Claude Code

It falls back to long on Ruby versions that do not define HAVE_RB_LEN_T, so the change also builds there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt merged commit f3906a6 into master Oct 11, 2026
70 checks passed
@hsbt
hsbt deleted the claude/fervent-pare-2991fb branch October 11, 2026 09:23
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