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.
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.
1030 1031 1032 |
# File 'object.c', line 1030 static VALUE false_xor(obj, obj2) VALUE obj, obj2; |
#to_s ⇒ Object
‘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.
1010 1011 1012 |
# File 'object.c', line 1010 static VALUE false_or(obj, obj2) VALUE obj, obj2; |