Skip to content

Commit

Permalink
Add missing block argument
Browse files Browse the repository at this point in the history
A block is part of the Delegator's contract. Ruby 3.4 issues a warning if a block is passed but unused. This commit fixes the warning by adding a block to the argument list.
  • Loading branch information
flash-gordon committed Feb 1, 2025
1 parent 6c9c471 commit 6979ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/weakref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def initialize(orig)
super
end

def __getobj__ # :nodoc:
def __getobj__(&_block) # :nodoc:
@@__map[self] or defined?(@delegate_sd_obj) ? @delegate_sd_obj :
Kernel::raise(RefError, "Invalid Reference - probably recycled", Kernel::caller(2))
end
Expand Down

0 comments on commit 6979ee1

Please sign in to comment.