Skip to content

Conversation

@thomasmarshall
Copy link

@thomasmarshall thomasmarshall commented Dec 15, 2025

The original RBS rewriter runs after the parser has assigned unique names to anonymous parameters, which it can then pull out of the method definition. With the Prism RBS rewriter, we can't generate unique names until later on when the translator is run. We can use static names instead as *, **, and & are guaranteed to be unique anyway (in fact this is already the case for the rest param).

The original RBS rewriter runs after the parser has assigned unique
names to anonymous parameters, which it can then pull out of the method
definition. With the Prism RBS rewriter, we can't generate unique names
until later on when the translator is run. We can use static names
instead as `*`, `**`, and `&` are guaranteed to be unique anyway (in
fact this is already the case for the block param).
@thomasmarshall thomasmarshall force-pushed the anonymous-parameter-names branch from a5d8cac to 0af67b9 Compare December 15, 2025 18:21
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