mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[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.
9495ec9191
This commit is contained in:
parent
15e6f13ff7
commit
e8cf441485
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ class WeakRef < Delegator
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue