Repository navigation
regexp: consume n/u/e/s encoding modifiers (go-ruby-parser v0.1.8) - #587
Merged
Merged
Conversation
go-ruby-parser v0.1.8 (#23) now records the encoding modifiers n/u/e/s in RegexpLit.Flags alongside i/m/x/o. compileRegexp maps them onto the Regexp's FIXEDENCODING/NOENCODING state and source encoding (MRI re.c char_to_option / rb_reg_initialize): n=ASCII-8BIT (NOENCODING), u=UTF-8, e=EUC-JP, s=Windows-31J (u/e/s FIXEDENCODING); last encoding letter wins. i/m/x/o are unaffected and sortIMX still excludes the new letters from the engine prefix. Verified byte-for-byte vs MRI 4.0.5: /x/n.options 32, /x/u.options 16, /x/u.encoding UTF-8, /x/e EUC-JP, /x/s Windows-31J, /x/n.encoding US-ASCII, /x/u.fixed_encoding? true, /a/un.options 32. Ratchet: core/regexp 229->241 (+12), language/regexp 192->198 (+6). Bumps go-ruby-parser 0.1.7 -> 0.1.8. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tannevaled
added a commit
that referenced
this pull request
Sep 7, 2026
…590) Wave-18 merged three bibliography-first conformance PRs: - #587 core/regexp: consume the n/u/e/s encoding modifiers now recorded by go-ruby-parser v0.1.8 (cross-repo #23) — core/regexp +12, language/regexp +6. - #588 core/io: read/write/positioning/iteration surface (gets/each/seek symbol whence/closed-stream guards/putc/sync/binread) — core/io +48. - #589 core/kernel: Integer/Float coercion messages, default Object#inspect with the object address + ivars, Object#<=> via #== with a Comparable#== recursion guard (fixing a stack overflow), at_exit no-block ArgumentError — core/kernel +16. Measured total on merged main: 19651 passing. Local measure at TIMEOUT=25; CI runs TIMEOUT=60 so its total is >= this floor. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks the regexp encoding-modifier specs that two prior waves flagged as parser-gated.
Cross-repo fix. go-ruby-parser #23 (merged, tagged v0.1.8) now records the
n/u/e/sregexp encoding modifiers inRegexpLit.Flags(they were deliberately dropped before). This PR bumps rbgo to v0.1.8 and consumes them ininternal/vm/regexp.gocompileRegexp: mapping per MRIre.c char_to_option—n=ASCII-8BIT (NOENCODING),u=UTF-8,e=EUC-JP,s=Windows-31J (u/e/s FIXEDENCODING); the last encoding letter wins;i/m/x/oare unaffected andsortIMXkeeps the new letters out of the engine prefix.Verified byte-for-byte vs MRI 4.0.5 (18/18 cases):
/x/n.options==32,/x/u.options==16,/x/u.encoding==UTF-8,/x/e==EUC-JP,/x/s==Windows-31J,/x/n.encoding==US-ASCII,/x/u.fixed_encoding?==true,/a/un.options==32.Ratchet: core/regexp 229→241 (+12), language/regexp 192→198 (+6) = +18.
Gates:
go build ./..., fullgo test ./...(no pinned test broke), 100% coverage on compileRegexp + applyRegexpEncodingFlags, gofmt clean, wasip1 build. FLOOR untouched (bumped in the consolidated wave-18 floor PR).🤖 Generated with Claude Code