Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove evals from pattern-matching spec #1155

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

headius
Copy link
Contributor

@headius headius commented Jun 6, 2024

Some evals remain for SyntaxError tests that would not parse in the main script.

Most of this was done using automated tools so a few irrelevant formatting changes may have crept in.

Fixes #1152

Some evals remain for SyntaxError tests that would not parse in
the main script.

Most of this was done using automated tools so a few irrelevant
formatting changes may have crept in.

Fixes ruby#1152
@headius headius force-pushed the remove_pattern_evals branch 2 times, most recently from a393b65 to 35d60c8 Compare June 6, 2024 22:18
@headius headius force-pushed the remove_pattern_evals branch 2 times, most recently from de14b8b to 567a79c Compare June 6, 2024 22:57
@headius
Copy link
Contributor Author

headius commented Jun 6, 2024

Rubocop had to be bumped to 3.1 to support the newer pattern syntax. Bumping to 3.3 brought out a bunch of issues with requires like 'fiber' and 'set' that are no longer needed.

@headius headius merged commit 46ff8e2 into ruby:master Jun 6, 2024
14 checks passed
@headius headius deleted the remove_pattern_evals branch June 6, 2024 23:05
@eregon
Copy link
Member

eregon commented Jun 7, 2024

Thank you, it looks great.

We could have kept the 3.1 stuff in eval's (would address RuboCop and not need a separate file), but anyway I guess we'll make ruby/spec 3.1+ soon since 3.0 is EOL now.
At that point we can also put language/pattern_matching/3.1.rb back in language/pattern_matching_spec.rb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Using eval for expectations prevents testing other execution modes
2 participants