Skip to content

Match Ruby escape parsing semantics - #3126

Closed
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/ruby-escape-semantics
Closed

OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/ruby-escape-semantics

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary: align native unescaping with Ruby octal, hexadecimal, unknown-escape, multibyte replacement, and unsigned character classification behavior.

Verification: focused baseline/fixed reproduction, combined RBS 4.2.0 consumer models, and RuboCop (738 files, zero offenses). Added parser regression tests for octal, hexadecimal, and unknown escapes: 50 tests and 473 assertions pass after rebuilding the native extension. Targeted RuboCop passes.

Compatibility: no public API removal or dependency/version change.

@ksss ksss self-assigned this Sep 7, 2026
@ksss

ksss commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Please add test code for the issue you want to achieve.

@OskarEichler

Copy link
Copy Markdown
Contributor Author

Added parser-level regression tests for non-octal digits, stopping an octal escape before 8, the three-digit octal limit, a single-digit hex escape at the end of a string, two-digit hex, and an unknown escape without an inserted NUL byte. Rebuilt the native extension; parser suite passes (50 tests, 473 assertions), as do targeted RuboCop and git diff --check.

@ksss

ksss commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

The problem to be solved is unclear. Closing this.

@ksss ksss closed this Sep 28, 2026
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.

2 participants