Class: FalseClass

Inherits:
Object show all
Defined in:
object.c,
object.c

Overview

The global value false is the only instance of class FalseClass and represents a logically false value in boolean expressions. The class provides operators allowing false to participate correctly in logical expressions.

Instance Method Summary collapse

Instance Method Details

#&(obj) ⇒ false #&(obj) ⇒ false

And—Returns false. obj is always evaluated as it is the argument to a method call—there is no short-circuit evaluation in this case.

Overloads:

  • #&(obj) ⇒ false

    Returns:

    • (false)
  • #&(obj) ⇒ false

    Returns:

    • (false)

1516
1517
1518
1519
1520
# File 'object.c', line 1516

static VALUE
false_and(VALUE obj, VALUE obj2)
{
    return Qfalse;
}

#===Object

#^Object

#to_sObject Also known as: inspect

The string representation of false is “false”.


1500
1501
1502
1503
1504
# File 'object.c', line 1500

static VALUE
false_to_s(VALUE obj)
{
    return rb_cFalseClass_to_s;
}

#|Object