Skip to content

Fix Ruby 3.4.0 block warnings #16

@bkuhlmann

Description

@bkuhlmann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions