Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Object#respond_to_missing?

(::Symbol | ::String name, bool include_all) -> bool
obj.respond_to_missing?(symbol, include_all) → true or false
obj.respond_to_missing?(string, include_all) → true or false

DO NOT USE THIS DIRECTLY.

Hook method to return whether the obj can respond to id method or not.

When the method name parameter is given as a string, the string is converted to a symbol.

See respond_to?, and the example of BasicObject.