summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-21 11:31:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-21 11:31:36 +0900
commit1bc2a9158966a4a1556529d8bb50fae66fa11bb0 (patch)
tree9c40e7b129f1d67a16a4056fdb31f42602395e12 /doc
parente2243ed232d6a67e4a3e84e30e82b792a39b21e0 (diff)
[DOC] Align tables in globals.md
* Align "Contains" column in "Streams" table * Align some columns vertically * Remove a duplicate `$-a` description
Diffstat (limited to 'doc')
-rw-r--r--doc/language/globals.md36
1 files changed, 16 insertions, 20 deletions
diff --git a/doc/language/globals.md b/doc/language/globals.md
index 4d42798b8c..a4199e488a 100644
--- a/doc/language/globals.md
+++ b/doc/language/globals.md
@@ -14,16 +14,16 @@ require 'English'
### Exceptions
-| Variable | \English | Contains | Initially | Read-Only | Reset By |
-|:--------:|:-----------------:|-----------------------------------------|:---------:|:---------:|---------------|
-| `$!` | `$ERROR_INFO` | \Exception object or `nil` | `nil` | Yes | Kernel#raise |
-| `$@` | `$ERROR_POSITION` | \Array of backtrace positions or `nil` | `nil` | Yes | Kernel#raise |
+| Variable | \English | Contains | Initially | Read-Only | Reset By |
+|:--------:|:-----------------:|----------------------------------------|:---------:|:---------:|--------------|
+| `$!` | `$ERROR_INFO` | \Exception object or `nil` | `nil` | Yes | Kernel#raise |
+| `$@` | `$ERROR_POSITION` | \Array of backtrace positions or `nil` | `nil` | Yes | Kernel#raise |
### Pattern Matching
| Variable | \English | Contains | Initially | Read-Only | Reset By |
|:-------------:|:-------------------:|-----------------------------------|:---------:|:---------:|-----------------|
-| `$~` | `$LAST_MATCH_INFO` | \MatchData object or `nil` | `nil` | No | Matcher methods |
+| `$~` | `$LAST_MATCH_INFO` | \MatchData object or `nil` | `nil` | No | Matcher methods |
| `$&` | `$MATCH` | Matched substring or `nil` | `nil` | No | Matcher methods |
| `` $` `` | `$PRE_MATCH` | Substring left of match or `nil` | `nil` | No | Matcher methods |
| `$'` | `$POST_MATCH` | Substring right of match or `nil` | `nil` | No | Matcher methods |
@@ -41,15 +41,15 @@ require 'English'
### Streams
-| Variable | \English | Contains | Initially | Read-Only | Reset By |
-|:---------:|:----------------------------:|:-------------------------------------------:|:---------:|:---------:|----------------------|
-| `$stdin` | | Standard input stream | `STDIN` | No | |
+| Variable | \English | Contains | Initially | Read-Only | Reset By |
+|:---------:|:----------------------------:|---------------------------------------------|:---------:|:---------:|----------------------|
+| `$stdin` | | Standard input stream | `STDIN` | No | |
| `$stdout` | | Standard output stream | `STDOUT` | No | |
| `$stderr` | | Standard error stream | `STDERR` | No | |
-| `$<` | `$DEFAULT_INPUT` | Default standard input | `ARGF` | Yes | |
-| `$>` | `$DEFAULT_OUTPUT` | Default standard output | `STDOUT` | No | |
-| `$.` | `$INPUT_LINE_NUMBER`, `$NR` | Input position of most recently read stream | 0 | No | Certain read methods |
-| `$_` | `$LAST_READ_LINE` | String from most recently read stream | `nil` | No | Certain read methods |
+| `$<` | `$DEFAULT_INPUT` | Default standard input | `ARGF` | Yes | |
+| `$>` | `$DEFAULT_OUTPUT` | Default standard output | `STDOUT` | No | |
+| `$.` | `$INPUT_LINE_NUMBER`, `$NR` | Input position of most recently read stream | 0 | No | Certain read methods |
+| `$_` | `$LAST_READ_LINE` | String from most recently read stream | `nil` | No | Certain read methods |
### Processes
@@ -64,11 +64,11 @@ require 'English'
### Debugging
-| Variable | \English | Contains | Initially | Read-Only | Reset By |
+| Variable | \English | Contains | Initially | Read-Only | Reset By |
|:-----------:|:--------:|--------------------------------------------|:----------------------------:|:---------:|----------|
-| `$FILENAME` | | Value returned by method `ARGF.filename` | Command-line argument or '-' | Yes | |
-| `$DEBUG` | | Whether option `-d` or `--debug` was given | Command-line option | No | |
-| `$VERBOSE` | | Whether option `-V` or `-W` was given | Command-line option | No | |
+| `$FILENAME` | | Value returned by method `ARGF.filename` | Command-line argument or '-' | Yes | |
+| `$DEBUG` | | Whether option `-d` or `--debug` was given | Command-line option | No | |
+| `$VERBOSE` | | Whether option `-V` or `-W` was given | Command-line option | No | |
### Other Variables
@@ -352,10 +352,6 @@ Aliased as `$-v` and `$-w`.
## Other Variables
-### `$-a`
-
-Whether command-line option `-a` was given; read-only.
-
### `$-F`
The default field separator in String#split; must be a String or a