Ruby v1.6 Class and Library Reference: FalseClass

class FalseClass |
Parent: | Object
Version: | 1.6

### Index:

& ^ |

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
& | `false` & anObject -> `false`
|  | And-Returns `false`. anObject is always evaluated as it is the argument to a method call-there is no short-circuit evaluation in this case.
^ | `false` ^ anObject -> `true` or `false`
|  | Exclusive Or-If anObject is `nil` or `false`, returns `false`; otherwise, returns `true`.
| | `false` | anObject -> `true` or `false`
|  | Or-Returns `false` if anObject is `nil` or `false`; `true` otherwise.

Extracted from the book "Programming Ruby - The Pragmatic Programmer's Guide"
Copyright © 2000 Addison Wesley Longman, Inc. Released under the terms of the Open Publication License V1.0.
This reference is available for download.