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 |
Get Ruby Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.