Class: FalseClass
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
-
#& ⇒ Object
And---Returns
false. -
#^ ⇒ Object
Exclusive Or---If obj is
nilorfalse, returnsfalse; otherwise, returnstrue. -
#to_s ⇒ Object
'nuf said...
-
#| ⇒ Object
Or---Returns
falseif obj isnilorfalse;trueotherwise.
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.
987 988 989 |
# File 'object.c', line 987 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.
1024 1025 1026 |
# File 'object.c', line 1024 static VALUE false_xor(obj, obj2) VALUE obj, obj2; |
#to_s ⇒ Object
'nuf said...
970 971 972 |
# File 'object.c', line 970 static VALUE false_to_s(obj) VALUE obj; |
#|(obj) ⇒ Boolean #|(obj) ⇒ Boolean
Or---Returns false if obj is
nil or false; true otherwise.
1004 1005 1006 |
# File 'object.c', line 1004 static VALUE false_or(obj, obj2) VALUE obj, obj2; |