Global Constants
Table 5 describes all of Ruby’s global constants.
Table 5. Global constants
Constant | Description |
|---|---|
| I/O-like stream that allows access to a virtual concatenation of all files provided on the command line, or standard input if no files are provided. Synonym for $<. |
| Array that contains all the command-line arguments passed to a program. Synonym for |
| An input stream for reading the lines of code following the |
| A hash-like object containing the program’s environment variables; can be treated as a hash. |
| Synonym for |
| Synonym for |
| Synonym for |
| Synonym for |
| A string indicating the platform of the Ruby interpreter; e.g., “powerpc-darwin8.9.0.” |
| A string indicating the release date of the Ruby interpreter; e.g., “2007-03-13.” |
| The Ruby version; e.g., “1.8.6.” |
| Standard error output stream with default value of |
| Standard input stream with default value of |
| Standard output stream with default value of |
| A |
| Synonym for |
| Synonym for |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access