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)


993
994
995
# File 'object.c', line 993

static VALUE
false_and(obj, obj2)
VALUE obj, obj2;

#^(obj) ⇒ Boolean #^(obj) ⇒ Boolean

Exclusive Or—If obj is nil or false, returns false; otherwise, returns true.

Overloads:

  • #^(obj) ⇒ Boolean

    Returns:

    • (Boolean)
  • #^(obj) ⇒ Boolean

    Returns:

    • (Boolean)


1030
1031
1032
# File 'object.c', line 1030

static VALUE
false_xor(obj, obj2)
VALUE obj, obj2;

#to_sObject

‘nuf said…



976
977
978
# File 'object.c', line 976

static VALUE
false_to_s(obj)
VALUE obj;

#|(obj) ⇒ Boolean #|(obj) ⇒ Boolean

Or—Returns false if obj is nil or false; true otherwise.

Overloads:

  • #|(obj) ⇒ Boolean

    Returns:

    • (Boolean)
  • #|(obj) ⇒ Boolean

    Returns:

    • (Boolean)


1010
1011
1012
# File 'object.c', line 1010

static VALUE
false_or(obj, obj2)
VALUE obj, obj2;