Skip to content

Commit 9495ec9

Browse files
committed
Add missing block parameter
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.
1 parent a8887a4 commit 9495ec9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/weakref.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def initialize(orig)
4141
super
4242
end
4343

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

0 commit comments

Comments
 (0)