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

#&(object) ⇒ false #&(object) ⇒ false

Returns false:

false & true       # => false
false & Object.new # => false

Argument object is evaluated:

false & raise # Raises RuntimeError.

Overloads:

  • #&(object) ⇒ false

    Returns:

    • (false)
  • #&(object) ⇒ false

    Returns:

    • (false)


1601
1602
1603
1604
1605
# File 'object.c', line 1601

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”.



1580
1581
1582
1583
1584
# File 'object.c', line 1580

VALUE
rb_false_to_s(VALUE obj)
{
    return rb_cFalseClass_to_s;
}

#|Object