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

TEST: remove invalid yield usage from spec example #1519

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

mtasaka
Copy link
Contributor

@mtasaka mtasaka commented Nov 14, 2023

Using yield outside method definition is invalid, and with ruby3.3.0dev, this usage in spec example file causes spec testsuite failure.

So to make test pass also on ruby3.3, remove this usage.

Fixes #1514 .

Completed Tasks

  • I have read the [Contributing Guide][contrib].
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

Using yield outside method definition is invalid, and
with ruby3.3.0dev, this usage in spec example file causes
spec testsuite failure.

So to make test pass also on ruby3.3, remove this usage.

Fixes lsegal#1514 .
Copy link
Owner

@lsegal lsegal left a comment

Choose a reason for hiding this comment

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

Unfortunately this still needs to be tested for older Ruby versions that yard still supports where the syntax is still legal although semantically unsupported.

I think this specific case should probably be moved into a version specific if block like we do for other version specific features.

@lsegal
Copy link
Owner

lsegal commented Feb 29, 2024

Revisiting this since it seems like there's no way to test without 3.3 support here, which is unfortunate.

@lsegal lsegal merged commit 3059017 into lsegal:main Feb 29, 2024
25 checks passed
@lsegal
Copy link
Owner

lsegal commented Feb 29, 2024

Thanks for the contribution!

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.

yield_handler_spec.rb test fails with recent ruby3.3.0dev
2 participants