Skip to content

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

instance method

FalseClass#===

(false) -> true
(untyped obj) -> bool
true === other → true or false
false === other → true or false
nil === other → true or false

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.

See also #& #^ #| also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0