Class
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 Methods
object.c
View on GitHub
static VALUE
false_and(VALUE obj, VALUE obj2)
{
return Qfalse;
}
Returns false
:
false & true # => false false & Object.new # => false
Argument object
is evaluated:
false & raise # Raises RuntimeError.
object.c
View on GitHub
#define case_equal rb_equal
object.c
View on GitHub
#define false_xor true_and
Returns false
if object
is nil
or false
, true
otherwise:
nil ^ nil # => false nil ^ false # => false nil ^ Object.new # => true
object.c
View on GitHub
VALUE
rb_false_to_s(VALUE obj)
{
return rb_cFalseClass_to_s;
}
The string representation of false
is “false”.
object.c
View on GitHub
#define false_or true_and
Returns false
if object
is nil
or false
, true
otherwise:
nil | nil # => false nil | false # => false nil | Object.new # => true