Skip to content

fix: any() in results picks the first alternative; multi-char sets stay alternations - #8

Merged
ronaldtse merged 1 commit into
mainfrom
feat/any-in-result
Sep 29, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
feat/any-in-result

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Three converter/engine correctness fixes for the Ruby-parity vocabulary:

  • to-position any() = first alternative — the Ruby runtime picks the first spelling in non-iterating mode; _repl_of now resolves the first element (nested anys and none included).
  • multi-char string sets stay alternations — _render_item collapsed all-string sets into a single-char class: any(["hello","Hello"]) was matching every single character. Sets keep the list form unless every string is one character.
  • title_case keeps its separators — the after-separator upcasing used a consuming match, deleting every separator occurrence (Hello World → HelloWorld).

Full suite 32 passed / 1 xpassed with INTERSCRIPT_MAPS_PATH. dsl_stage Python legs: 15 → 7 remaining locally (the tail is qualified map-aliases, backreferences in patterns, and parallel-any ordering — tracked as follow-up).

…ay alternations

A to-position any() lists alternative spellings; the Ruby runtime
picks the first in non-iterating mode — _repl_of now resolves the
first element (nested anys and none included).

_render_item collapsed all-string sets into a single-char class
(any("helloHelloHELLO") matches every character); sets now keep the
list form unless every string is a single character.

title_case keeps its separator: the after-separator upcasing used a
consuming match, deleting every separator occurrence.
@ronaldtse
ronaldtse merged commit ce22b21 into main Sep 29, 2026
6 checks passed
@ronaldtse
ronaldtse deleted the feat/any-in-result branch September 29, 2026 10:28
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