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

Enable BlockForwarding Linter Rules #1217

Open
arielvalentin opened this issue Oct 25, 2024 · 2 comments
Open

Enable BlockForwarding Linter Rules #1217

arielvalentin opened this issue Oct 25, 2024 · 2 comments
Labels
help wanted Extra attention is needed keep Ensures stale-bot keeps this issue/PR open

Comments

@arielvalentin
Copy link
Collaborator

arielvalentin commented Oct 25, 2024

Ruby 3.1 introduces a more performant anonymous block forwarding syntax that we should adopt once we freeze support for Ruby 3.0

https://bugs.ruby-lang.org/issues/11256

https://docs.rubocop.org/rubocop/cops_naming.html#namingblockforwarding
https://docs.rubocop.org/rubocop/cops_style.html#styleargumentsforwarding

@arielvalentin arielvalentin changed the title Enable Naming/BlockForwarding Linter Rule Enable BlockForwarding Linter Rules Oct 25, 2024
@fbogsany
Copy link
Contributor

Reading the issue, it sounds like this is not more performant - just syntactically simpler (no need to provide a block name). The original motivation was mostly about performance, but lazy proc allocation for blocks invalidated the performance rationale.

Not saying “no, don’t do this” - just pointing out there’s no performance benefit to doing so.

Copy link
Contributor

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

@github-actions github-actions bot added the stale Marks an issue/PR stale label Dec 17, 2024
@arielvalentin arielvalentin added help wanted Extra attention is needed keep Ensures stale-bot keeps this issue/PR open and removed stale Marks an issue/PR stale labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed keep Ensures stale-bot keeps this issue/PR open
Projects
None yet
Development

No branches or pull requests

2 participants