- Notifications
You must be signed in to change notification settings - Fork5.5k
[DOC] Enhancements for globals.md#15545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
nobu commentedDec 17, 2025
Don't the tables in the "In Brief" section overlap with those in the "Summary" section? |
BurdetteLamar commentedDec 17, 2025
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| |`$FILENAME`|| The value returned by method`ARGF#filename`.| Yes.|`ARGF`| | |
| |`$FILENAME`|| The value returned by method`ARGF.filename`.| Yes.|`ARGF`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
doc/language/globals.md Outdated
| Initially`true` if command-line option`-d` or`--debug` is given, | ||
| otherwise initially`false`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Duplicate with the next sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
doc/language/globals.md Outdated
| Initially`true` if command-line option`-v` or`-w` is given, | ||
| otherwise initially`false`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Duplicate with the next sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
doc/language/globals.md Outdated
| Whether command-line option`-l` was set; read-only. | ||
| ###`$-p` | ||
| Whether command-line option`-p` was given; read-only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Duplicate with the paragraphs after$-F.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
doc/language/globals.md Outdated
| ###`$;` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is an alias of$-F, not fully-deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
doc/language/globals.md Outdated
| ###Streams | ||
| | Constant| Contains| | ||
| |----------|-------------------------| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unnecessary line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
| | 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.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ENV,ARGF, etc are not "Embedded Data".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed.
BurdetteLamar commentedDec 18, 2025
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. |
BurdetteLamar commentedDec 18, 2025
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why removing the link here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Restored.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
From here to "Debugging", why are the "Variable" columns expanded?
There are enough width already, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed? (Not sure what's wanted.)
Replacement for#15389.