Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Object#===
(untyped other) -> bool
true === other → true or false
false === other → true or false
nil === other → true or false
object.c
View on GitHub ↗
#define case_equal rb_equal
Returns true or false.
Like Object#==, if other 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.