Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
NilClass#nil?
() -> true
nil.nil? → true
object.c
View on GitHub ↗
static VALUE
rb_true(VALUE obj)
{
return Qtrue;
}
Returns true. For all other objects, method nil? returns false.