Skip to content

Enable frozen-string checks across MRI and JRuby - #488

Merged
yyuu merged 12 commits into
nahi:masterfrom
yyuu:ci/strict-frozen-string-literal
Nov 2, 2026
Merged

yyuu merged 12 commits into
nahi:masterfrom
yyuu:ci/strict-frozen-string-literal

Conversation

@yyuu

@yyuu yyuu commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Enable frozen-string-literal checks across the MRI and JRuby CI matrix, and fix the JRuby buffer mutations exposed by those checks.

Changes

  • Add JRuby 10.1 and jruby-head to the shared Ruby CI matrix, using Temurin 25.
  • Run nested JRuby-specific tests through Rake alongside the rest of the suite.
  • Keep JRuby socket and PEM working buffers mutable, and avoid mutating caller-owned binary strings during debug logging.
  • Address CI warnings in test code and load WEBrick HTTPS before the JRuby request patch to preserve the original parser.

Validation

  • GitHub Actions: all 12 matrix jobs passed; Ruby 2.5 passed on retry after an intermittent segfault in the SSL test suite.
  • JRuby 10.1.2.0 with Temurin 25: all 256 tests passed in two consecutive full-suite runs.

yyuu added 12 commits October 31, 2026 23:11
Duplicate socket and PEM buffers before mutating them, and copy binary debug input before changing its encoding. Add regression coverage for buffer reads, certificate chains, and frozen or mutable debug input.
WEBrick HTTPS aliases HTTPRequest#parse when loaded. Loading it after our prepend aliases the patch itself, causing recursive request parsing and StackOverflowError on JRuby.

Require HTTPS first so orig_parse retains the original parser. Verified with two full JRuby 10.1.2.0 / Temurin 25 test runs: 256 tests, no failures or errors, and no Ruby warnings.
@yyuu
yyuu marked this pull request as ready for review November 2, 2026 00:46
@yyuu
yyuu merged commit fb499dd into nahi:master Nov 2, 2026
24 checks passed
@yyuu
yyuu deleted the ci/strict-frozen-string-literal branch November 2, 2026 01:08
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