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

Fix unused block warnings for template methods #51597

Merged
merged 1 commit into from Apr 18, 2024

Conversation

casperisfine
Copy link
Contributor

Ref: https://bugs.ruby-lang.org/issues/15554

Ruby 3.4 now warns when passing a block to a method that never expects one.

In the case of rendered template, a block is always passed for some engines that do expect one, but some never expect it.

We can silence that warning by declaring an anonymous block.

@rails-bot rails-bot bot added the actionview label Apr 18, 2024
Ref: https://bugs.ruby-lang.org/issues/15554

Ruby 3.4 now warns when passing a block to a method that
never expects one.

In the case of rendered template, a block is always passed for
some engines that do expect one, but some never expect it.

We can silence that warning by declaring an anonymous block.
@byroot byroot merged commit d1d8149 into rails:main Apr 18, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants