diff options
| author | Nikita Shilnikov <fg@flashgordon.ru> | 2025-01-21 12:30:51 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-02-03 01:58:50 +0000 |
| commit | e8cf44148572683e7002cbd294dbcc1ad30bf462 (patch) | |
| tree | 583c4c1e8a09584c69c895c41b5ba8b118010119 /lib | |
| parent | 15e6f13ff7c80c42490c3004977d72d95b35bb21 (diff) | |
[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.
https://github.com/ruby/weakref/commit/9495ec9191
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/weakref.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/weakref.rb b/lib/weakref.rb index a8da39a26a..f0a7e7b318 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -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 |
