[DOC] Enhancements for globals.md#15545
Conversation
|
Don't the tables in the "In Brief" section overlap with those in the "Summary" section? |
Yes, and there are other (major) repetitions. Marking as draft while I study and fix. |
doc/language/globals.md
Outdated
|
|
||
| | Variable | \English | Initially | Read-Only | Set By | | ||
| |:------------:|:--------:|:---------------------------------------------:|:---------:|---------| | ||
| | `$FILENAME` | | The value returned by method `ARGF#filename`. | Yes. | `ARGF` | |
There was a problem hiding this comment.
| | `$FILENAME` | | The value returned by method `ARGF#filename`. | Yes. | `ARGF` | | |
| | `$FILENAME` | | The value returned by method `ARGF.filename`. | Yes. | `ARGF` | |
doc/language/globals.md
Outdated
| Initially `true` if command-line option `-d` or `--debug` is given, | ||
| otherwise initially `false`; |
doc/language/globals.md
Outdated
| Initially `true` if command-line option `-v` or `-w` is given, | ||
| otherwise initially `false`; |
doc/language/globals.md
Outdated
| Whether command-line option `-l` was set; read-only. | ||
|
|
||
| ### `$-p` | ||
|
|
||
| Whether command-line option `-p` was given; read-only. |
doc/language/globals.md
Outdated
| ### `$-a` | ||
|
|
||
| Whether command-line option `-a` was given; read-only. | ||
|
|
||
| ### `$-i` | ||
|
|
||
| Contains the extension given with command-line option `-i`, |
There was a problem hiding this comment.
Duplicate with the paragraphs after $-F.
doc/language/globals.md
Outdated
| ### `$;` | ||
|
|
There was a problem hiding this comment.
This is an alias of $-F, not fully-deprecated.
doc/language/globals.md
Outdated
| ### Streams | ||
|
|
||
| | Constant | Contains | | ||
| |----------|-------------------------| |
| | Constant | Contains | | ||
| |-----------------------|-------------------------------------------------------------------------------| | ||
| | `ENV` | Hash of current environment variable names and values. | | ||
| | `ARGF` | String concatenation of files given on the command line, or `$stdin` if none. | | ||
| | `ARGV` | Array of the given command-line arguments. | | ||
| | `TOPLEVEL_BINDING` | Binding of the top level scope. | | ||
| | `RUBY_VERSION` | String Ruby version. | | ||
| | `RUBY_RELEASE_DATE` | String Ruby release date. | | ||
| | `RUBY_PLATFORM` | String Ruby platform. | | ||
| | `RUBY_PATCH_LEVEL` | String Ruby patch level. | | ||
| | `RUBY_REVISION` | String Ruby revision. | | ||
| | `RUBY_COPYRIGHT` | String Ruby copyright. | | ||
| | `RUBY_ENGINE` | String Ruby engine. | | ||
| | `RUBY_ENGINE_VERSION` | String Ruby engine version. | | ||
| | `RUBY_DESCRIPTION` | String Ruby description. | |
doc/language/globals.md
Outdated
| | Constant | Contains | | ||
| |:---------------------:|-------------------------------------------------------------------------------| | ||
| | `DATA` | File containing embedded data (lines following `__END__`, if any). | | ||
| | `ENV` | Hash of current environment variable names and values. | | ||
| | `ARGF` | String concatenation of files given on the command line, or `$stdin` if none. | | ||
| | `ARGV` | Array of the given command-line arguments. | |
There was a problem hiding this comment.
ENV, ARGF, etc are not "Embedded Data".
I had revised and extended the tables in Summary for use in In Brief, then forgot to remove the entire Summary section. Have now removed, after rolling some of its information to In Brief. |
|
Thanks, @nobu, for working closely with me on this; I've made some careless errors (now fixed, I hope). I think this revision will make a difference to our readers. |
| ### `$-a` | ||
|
|
||
| Whether command-line option `-a` was given; read-only. | ||
|
|
There was a problem hiding this comment.
This is duplicate, $-a is written after $-F.
doc/language/globals.md
Outdated
| ### `$-l` | ||
|
|
||
| Whether [command-line option `-l`] was set; read-only. | ||
| Whether command-line option `-l` was set; read-only. |
doc/language/globals.md
Outdated
| | `$1` | | First group matched; set by matcher method. | | ||
| | `$2` | | Second group matched; set by matcher method. | | ||
| | <tt>$_n_</tt> | | <i>n</i>th group matched; set by matcher method. | | ||
| | Variable | \English | Contains | Initially | Read-Only | Reset By | |
There was a problem hiding this comment.
From here to "Debugging", why are the "Variable" columns expanded?
There are enough width already, I guess.
There was a problem hiding this comment.
Fixed? (Not sure what's wanted.)
doc/language/globals.md
Outdated
| | `$.` | `$INPUT_LINE_NUMBER`, `$NR` | Input position of most recently read stream. | | ||
| | `$_` | `$LAST_READ_LINE` | String from most recently read stream. | | ||
| | Variable | \English | Contains | Initially | Read-Only | Reset By | | ||
| |:---------:|----------------------------:|:-------------------------------------------:|:---------:|:---------:|----------------------| |
There was a problem hiding this comment.
Why does only this table right-align the "English" column?
Replacement for #15389.