End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Delegator#respond_to_missing?
respond_to_missing?(m, include_private)
lib/delegate.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/delegate.rb, line 99
def respond_to_missing?(m, include_private)
r = true
target = self.__getobj__ {r = false}
r &&= target_respond_to?(target, m, include_private)
if r && include_private && !target_respond_to?(target, m, false)
warn "delegator does not forward private method \##{m}", uplevel: 3
return false
end
r
end
Checks for a method provided by this the delegate object by forwarding the call through __getobj__.
See also
#raise
#__setobj__
#__raise__
#target_respond_to?
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0