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 Ruby 3.4.0 block warnings #16

Open
bkuhlmann opened this issue Mar 16, 2025 · 0 comments
Open

Fix Ruby 3.4.0 block warnings #16

bkuhlmann opened this issue Mar 16, 2025 · 0 comments

Comments

@bkuhlmann
Copy link

Why

Hello. 👋 I'm experiencing a bunch of warnings in my console and spec output when using this gem due to running Ruby with -W:strict_unused_block as my RUBYOPT setting. Example:

$HOME/.cache/frum/versions/3.4.2/lib/ruby/3.4.0/delegate.rb:84: warning: the block passed to 'WeakRef#__getobj__' defined at $HOME/.cache/frum/versions/3.4.2/lib/ruby/3.4.0/weakref.rb:44 may be ignored

The problem is that a block is being passed but never used. Would it be possible to fix this issue so the warning doesn't appear?

How

To recreate, you should only need the RUPYOPT setting enabled as shown above or running the test suite for this gem with Warning[:strict_unused_block] = true would do it as well.

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

No branches or pull requests

1 participant