Skip to content

Commit e8cf441

Browse files
flash-gordonmatzbot
authored andcommitted
[ruby/weakref] 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. ruby/weakref@9495ec9191
1 parent 15e6f13 commit e8cf441

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)