Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Object#===

true === other → true or false
false === other → true or false
nil === other → true or false

Returns true or false.

Like Object#==, if object is an instance of Object (and not an instance of one of its many subclasses).

This method is commonly overridden by those subclasses, to provide meaningful semantics in case statements.

See also #<=> #CSV #!~ #define_singleton_method also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0