Skip to content

Commit 1bc2a91

Browse files
committed
[DOC] Align tables in globals.md
* Align "Contains" column in "Streams" table * Align some columns vertically * Remove a duplicate `$-a` description
1 parent e2243ed commit 1bc2a91

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

doc/language/globals.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ require 'English'
1414

1515
### Exceptions
1616

17-
| Variable | \English | Contains | Initially | Read-Only | Reset By |
18-
|:--------:|:-----------------:|-----------------------------------------|:---------:|:---------:|---------------|
19-
| `$!` | `$ERROR_INFO` | \Exception object or `nil` | `nil` | Yes | Kernel#raise |
20-
| `$@` | `$ERROR_POSITION` | \Array of backtrace positions or `nil` | `nil` | Yes | Kernel#raise |
17+
| Variable | \English | Contains | Initially | Read-Only | Reset By |
18+
|:--------:|:-----------------:|----------------------------------------|:---------:|:---------:|--------------|
19+
| `$!` | `$ERROR_INFO` | \Exception object or `nil` | `nil` | Yes | Kernel#raise |
20+
| `$@` | `$ERROR_POSITION` | \Array of backtrace positions or `nil` | `nil` | Yes | Kernel#raise |
2121

2222
### Pattern Matching
2323

2424
| Variable | \English | Contains | Initially | Read-Only | Reset By |
2525
|:-------------:|:-------------------:|-----------------------------------|:---------:|:---------:|-----------------|
26-
| `$~` | `$LAST_MATCH_INFO` | \MatchData object or `nil` | `nil` | No | Matcher methods |
26+
| `$~` | `$LAST_MATCH_INFO` | \MatchData object or `nil` | `nil` | No | Matcher methods |
2727
| `$&` | `$MATCH` | Matched substring or `nil` | `nil` | No | Matcher methods |
2828
| `` $` `` | `$PRE_MATCH` | Substring left of match or `nil` | `nil` | No | Matcher methods |
2929
| `$'` | `$POST_MATCH` | Substring right of match or `nil` | `nil` | No | Matcher methods |
@@ -41,15 +41,15 @@ require 'English'
4141

4242
### Streams
4343

44-
| Variable | \English | Contains | Initially | Read-Only | Reset By |
45-
|:---------:|:----------------------------:|:-------------------------------------------:|:---------:|:---------:|----------------------|
46-
| `$stdin` | | Standard input stream | `STDIN` | No | |
44+
| Variable | \English | Contains | Initially | Read-Only | Reset By |
45+
|:---------:|:----------------------------:|---------------------------------------------|:---------:|:---------:|----------------------|
46+
| `$stdin` | | Standard input stream | `STDIN` | No | |
4747
| `$stdout` | | Standard output stream | `STDOUT` | No | |
4848
| `$stderr` | | Standard error stream | `STDERR` | No | |
49-
| `$<` | `$DEFAULT_INPUT` | Default standard input | `ARGF` | Yes | |
50-
| `$>` | `$DEFAULT_OUTPUT` | Default standard output | `STDOUT` | No | |
51-
| `$.` | `$INPUT_LINE_NUMBER`, `$NR` | Input position of most recently read stream | 0 | No | Certain read methods |
52-
| `$_` | `$LAST_READ_LINE` | String from most recently read stream | `nil` | No | Certain read methods |
49+
| `$<` | `$DEFAULT_INPUT` | Default standard input | `ARGF` | Yes | |
50+
| `$>` | `$DEFAULT_OUTPUT` | Default standard output | `STDOUT` | No | |
51+
| `$.` | `$INPUT_LINE_NUMBER`, `$NR` | Input position of most recently read stream | 0 | No | Certain read methods |
52+
| `$_` | `$LAST_READ_LINE` | String from most recently read stream | `nil` | No | Certain read methods |
5353

5454
### Processes
5555

@@ -64,11 +64,11 @@ require 'English'
6464

6565
### Debugging
6666

67-
| Variable | \English | Contains | Initially | Read-Only | Reset By |
67+
| Variable | \English | Contains | Initially | Read-Only | Reset By |
6868
|:-----------:|:--------:|--------------------------------------------|:----------------------------:|:---------:|----------|
69-
| `$FILENAME` | | Value returned by method `ARGF.filename` | Command-line argument or '-' | Yes | |
70-
| `$DEBUG` | | Whether option `-d` or `--debug` was given | Command-line option | No | |
71-
| `$VERBOSE` | | Whether option `-V` or `-W` was given | Command-line option | No | |
69+
| `$FILENAME` | | Value returned by method `ARGF.filename` | Command-line argument or '-' | Yes | |
70+
| `$DEBUG` | | Whether option `-d` or `--debug` was given | Command-line option | No | |
71+
| `$VERBOSE` | | Whether option `-V` or `-W` was given | Command-line option | No | |
7272

7373
### Other Variables
7474

@@ -352,10 +352,6 @@ Aliased as `$-v` and `$-w`.
352352

353353
## Other Variables
354354

355-
### `$-a`
356-
357-
Whether command-line option `-a` was given; read-only.
358-
359355
### `$-F`
360356

361357
The default field separator in String#split; must be a String or a

0 commit comments

Comments
 (0)