Skip to content

Conversation

@Earlopain
Copy link
Collaborator

RipperTest already does this (added in #3849)
Since it doesn't use the token classes, it also lists out all the excludes instead of just claiming some are passing.

Also see #3855

Comment on lines -91 to -94
result = Prism.lex_compat(source, version: "current")
assert_equal [], result.errors

Prism.lex_ripper(source).zip(result.value).each do |(ripper, prism)|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still test Prism.lex_compat & Prism.lex_ripper?
They don't seem tested by #3849 from a quick look, but maybe I missed something.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lex_compat is what drives Translation::Ripper so that should be good. I'm not sure what the use-case for lex_ripper is, seems useful only for for testing against the real one in prism itself.

Both are also pretty extensively used in the various lex CI steps. I added a basic test for them back here.

@Earlopain Earlopain force-pushed the no-duplicate-lex-tests branch 2 times, most recently from 5b46b3f to a438f5e Compare January 18, 2026 14:17
`RipperTest` already does this (added in ruby#3849)
Since it doesn't use the token classes, it also lists out all the excludes instead of just claiming some are passing.
@Earlopain Earlopain force-pushed the no-duplicate-lex-tests branch from a438f5e to e86a282 Compare January 19, 2026 07:33
@Earlopain
Copy link
Collaborator Author

Merging so the logic for comparing doesn't have to be implemented in two places.

@Earlopain Earlopain merged commit d3d3de9 into ruby:main Jan 19, 2026
66 checks passed
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