Merge pull request #19875 from Homebrew/lazy_object-fix

lazy_object: fix `__getobj__` signature
This commit is contained in:
Bo Anderson 2025-05-02 00:38:58 +00:00 committed by GitHub
commit 90a372b433
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,17 +9,15 @@ class LazyObject < Delegator
super(callable)
end
def __getobj__
def __getobj__(&)
return @__getobj__ if defined?(@__getobj__)
@__getobj__ = @__callable__.call
end
private :__getobj__
def __setobj__(callable)
@__callable__ = callable
end
private :__setobj__
# Forward to the inner object to make lazy objects type-checkable.
#