diff options
| author | Stan Lo <stan001212@gmail.com> | 2025-11-27 23:31:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-27 23:31:32 +0000 |
| commit | 5b1ed1ef2076b3a89ba28836eee6072cb16124dc (patch) | |
| tree | 73992482c5813a6581ccd62ad247908c68610cef | |
| parent | 4cd6661e1853930c8002174c4ccd14f927fcd33b (diff) | |
[DOC] Remove unneeded filename from rdoc-ref links (#15339)
| -rw-r--r-- | doc/language/calendars.rdoc | 2 | ||||
| -rw-r--r-- | doc/language/format_specifications.rdoc | 26 | ||||
| -rw-r--r-- | doc/language/options.md | 70 | ||||
| -rw-r--r-- | doc/language/strftime_formatting.rdoc | 6 |
4 files changed, 51 insertions, 53 deletions
diff --git a/doc/language/calendars.rdoc b/doc/language/calendars.rdoc index eb9638f552..a2540f1c43 100644 --- a/doc/language/calendars.rdoc +++ b/doc/language/calendars.rdoc @@ -31,7 +31,7 @@ See also {a concrete example here}[rdoc-ref:DateTime@When+should+you+use+DateTim === Argument +start+ Certain methods in class \Date handle differences in the -{Julian and Gregorian calendars}[rdoc-ref:language/calendars.rdoc@Julian+and+Gregorian+Calendars] +{Julian and Gregorian calendars}[rdoc-ref:@Julian+and+Gregorian+Calendars] by accepting an optional argument +start+, whose value may be: - Date::ITALY (the default): the created date is Julian diff --git a/doc/language/format_specifications.rdoc b/doc/language/format_specifications.rdoc index 61eaefec4a..a59f210377 100644 --- a/doc/language/format_specifications.rdoc +++ b/doc/language/format_specifications.rdoc @@ -46,42 +46,42 @@ The links lead to the details and examples. === \Integer Type Specifiers - +b+ or +B+: Format +argument+ as a binary integer. - See {Specifiers b and B}[rdoc-ref:language/format_specifications.rdoc@Specifiers+b+and+B]. + See {Specifiers b and B}[rdoc-ref:@Specifiers+b+and+B]. - +d+, +i+, or +u+ (all are identical): Format +argument+ as a decimal integer. - See {Specifier d}[rdoc-ref:language/format_specifications.rdoc@Specifier+d]. + See {Specifier d}[rdoc-ref:@Specifier+d]. - +o+: Format +argument+ as an octal integer. - See {Specifier o}[rdoc-ref:language/format_specifications.rdoc@Specifier+o]. + See {Specifier o}[rdoc-ref:@Specifier+o]. - +x+ or +X+: Format +argument+ as a hexadecimal integer. - See {Specifiers x and X}[rdoc-ref:language/format_specifications.rdoc@Specifiers+x+and+X]. + See {Specifiers x and X}[rdoc-ref:@Specifiers+x+and+X]. === Floating-Point Type Specifiers - +a+ or +A+: Format +argument+ as hexadecimal floating-point number. - See {Specifiers a and A}[rdoc-ref:language/format_specifications.rdoc@Specifiers+a+and+A]. + See {Specifiers a and A}[rdoc-ref:@Specifiers+a+and+A]. - +e+ or +E+: Format +argument+ in scientific notation. - See {Specifiers e and E}[rdoc-ref:language/format_specifications.rdoc@Specifiers+e+and+E]. + See {Specifiers e and E}[rdoc-ref:@Specifiers+e+and+E]. - +f+: Format +argument+ as a decimal floating-point number. - See {Specifier f}[rdoc-ref:language/format_specifications.rdoc@Specifier+f]. + See {Specifier f}[rdoc-ref:@Specifier+f]. - +g+ or +G+: Format +argument+ in a "general" format. - See {Specifiers g and G}[rdoc-ref:language/format_specifications.rdoc@Specifiers+g+and+G]. + See {Specifiers g and G}[rdoc-ref:@Specifiers+g+and+G]. === Other Type Specifiers - +c+: Format +argument+ as a character. - See {Specifier c}[rdoc-ref:language/format_specifications.rdoc@Specifier+c]. + See {Specifier c}[rdoc-ref:@Specifier+c]. - +p+: Format +argument+ as a string via <tt>argument.inspect</tt>. - See {Specifier p}[rdoc-ref:language/format_specifications.rdoc@Specifier+p]. + See {Specifier p}[rdoc-ref:@Specifier+p]. - +s+: Format +argument+ as a string via <tt>argument.to_s</tt>. - See {Specifier s}[rdoc-ref:language/format_specifications.rdoc@Specifier+s]. + See {Specifier s}[rdoc-ref:@Specifier+s]. - <tt>%</tt>: Format +argument+ (<tt>'%'</tt>) as a single percent character. - See {Specifier %}[rdoc-ref:language/format_specifications.rdoc@Specifier+-25]. + See {Specifier %}[rdoc-ref:@Specifier+-25]. == Flags The effect of a flag may vary greatly among type specifiers. These remarks are general in nature. -See {type-specific details}[rdoc-ref:language/format_specifications.rdoc@Type+Specifier+Details+and+Examples]. +See {type-specific details}[rdoc-ref:@Type+Specifier+Details+and+Examples]. Multiple flags may be given with single type specifier; order does not matter. diff --git a/doc/language/options.md b/doc/language/options.md index ededb67f8d..c805c7dd65 100644 --- a/doc/language/options.md +++ b/doc/language/options.md @@ -68,15 +68,15 @@ nil See also: -- {Option -a}[rdoc-ref:language/options.md@a-3A+Split+Input+Lines+into+Fields]: +- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]: Split input lines into fields. -- {Option -F}[rdoc-ref:language/options.md@F-3A+Set+Input+Field+Separator]: +- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]: Set input field separator. -- {Option -l}[rdoc-ref:language/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: +- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: Set output record separator; chop lines. -- {Option -n}[rdoc-ref:language/options.md@n-3A+Run+Program+in+gets+Loop]: +- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]: Run program in `gets` loop. -- {Option -p}[rdoc-ref:language/options.md@p-3A+-n-2C+with+Printing]: +- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]: `-n`, with printing. ### `-a`: Split Input Lines into Fields @@ -98,15 +98,15 @@ and the default field separator is `$;`. See also: -- {Option -0}[rdoc-ref:language/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: +- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: Set `$/` (input record separator). -- {Option -F}[rdoc-ref:language/options.md@F-3A+Set+Input+Field+Separator]: +- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]: Set input field separator. -- {Option -l}[rdoc-ref:language/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: +- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: Set output record separator; chop lines. -- {Option -n}[rdoc-ref:language/options.md@n-3A+Run+Program+in+gets+Loop]: +- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]: Run program in `gets` loop. -- {Option -p}[rdoc-ref:language/options.md@p-3A+-n-2C+with+Printing]: +- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]: `-n`, with printing. ### `-c`: Check Syntax @@ -228,15 +228,15 @@ The argument must immediately follow the option See also: -- {Option -0}[rdoc-ref:language/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: +- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: Set `$/` (input record separator). -- {Option -a}[rdoc-ref:language/options.md@a-3A+Split+Input+Lines+into+Fields]: +- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]: Split input lines into fields. -- {Option -l}[rdoc-ref:language/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: +- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: Set output record separator; chop lines. -- {Option -n}[rdoc-ref:language/options.md@n-3A+Run+Program+in+gets+Loop]: +- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]: Run program in `gets` loop. -- {Option -p}[rdoc-ref:language/options.md@p-3A+-n-2C+with+Printing]: +- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]: `-n`, with printing. ### `-h`: Print Short Help Message @@ -314,15 +314,15 @@ $ ruby -ln -e 'p $_' desiderata.txt See also: -- {Option -0}[rdoc-ref:language/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: +- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: Set `$/` (input record separator). -- {Option -a}[rdoc-ref:language/options.md@a-3A+Split+Input+Lines+into+Fields]: +- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]: Split input lines into fields. -- {Option -F}[rdoc-ref:language/options.md@F-3A+Set+Input+Field+Separator]: +- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]: Set input field separator. -- {Option -n}[rdoc-ref:language/options.md@n-3A+Run+Program+in+gets+Loop]: +- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]: Run program in `gets` loop. -- {Option -p}[rdoc-ref:language/options.md@p-3A+-n-2C+with+Printing]: +- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]: `-n`, with printing. ### `-n`: Run Program in `gets` Loop @@ -348,15 +348,15 @@ be on good terms with all persons. See also: -- {Option -0}[rdoc-ref:language/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: +- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: Set `$/` (input record separator). -- {Option -a}[rdoc-ref:language/options.md@a-3A+Split+Input+Lines+into+Fields]: +- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]: Split input lines into fields. -- {Option -F}[rdoc-ref:language/options.md@F-3A+Set+Input+Field+Separator]: +- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]: Set input field separator. -- {Option -l}[rdoc-ref:language/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: +- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: Set output record separator; chop lines. -- {Option -p}[rdoc-ref:language/options.md@p-3A+-n-2C+with+Printing]: +- {Option -p}[rdoc-ref:@p-3A+-n-2C+with+Printing]: `-n`, with printing. ### `-p`: `-n`, with Printing @@ -377,15 +377,15 @@ be on good terms with all persons. See also: -- {Option -0}[rdoc-ref:language/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: +- {Option -0}[rdoc-ref:@0-3A+Set+-24-2F+-28Input+Record+Separator-29]: Set `$/` (input record separator). -- {Option -a}[rdoc-ref:language/options.md@a-3A+Split+Input+Lines+into+Fields]: +- {Option -a}[rdoc-ref:@a-3A+Split+Input+Lines+into+Fields]: Split input lines into fields. -- {Option -F}[rdoc-ref:language/options.md@F-3A+Set+Input+Field+Separator]: +- {Option -F}[rdoc-ref:@F-3A+Set+Input+Field+Separator]: Set input field separator. -- {Option -l}[rdoc-ref:language/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: +- {Option -l}[rdoc-ref:@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]: Set output record separator; chop lines. -- {Option -n}[rdoc-ref:language/options.md@n-3A+Run+Program+in+gets+Loop]: +- {Option -n}[rdoc-ref:@n-3A+Run+Program+in+gets+Loop]: Run program in `gets` loop. ### `-r`: Require Library @@ -434,7 +434,7 @@ $ ruby -s t.rb -foo=baz -bar=bat ``` The option may not be used with -{option -e}[rdoc-ref:language/options.md@e-3A+Execute+Given+Ruby+Code] +{option -e}[rdoc-ref:@e-3A+Execute+Given+Ruby+Code] ### `-S`: Search Directories in `ENV['PATH']` @@ -583,7 +583,7 @@ ruby - Copyright (C) 1993-2024 Yukihiro Matsumoto ### `--debug`: Alias for `-d` Option `--debug` is an alias for -{option -d}[rdoc-ref:language/options.md@d-3A+Set+-24DEBUG+to+true]. +{option -d}[rdoc-ref:@d-3A+Set+-24DEBUG+to+true]. ### `--disable`: Disable Features @@ -617,9 +617,9 @@ option was given: - `--dump=help`: Same as {option \-\-help}[options_md.html#label--help-3A+Print+Help+Message]. - `--dump=syntax`: - Same as {option -c}[rdoc-ref:language/options.md@c-3A+Check+Syntax]. + Same as {option -c}[rdoc-ref:@c-3A+Check+Syntax]. - `--dump=usage`: - Same as {option -h}[rdoc-ref:language/options.md@h-3A+Print+Short+Help+Message]. + Same as {option -h}[rdoc-ref:@h-3A+Print+Short+Help+Message]. - `--dump=version`: Same as {option \-\-version}[options_md.html#label--version-3A+Print+Ruby+Version]. @@ -641,7 +641,7 @@ see {option --disable}[options_md.html#label--disable-3A+Disable+Features]. ### `--encoding`: Alias for `-E`. Option `--encoding` is an alias for -{option -E}[rdoc-ref:language/options.md@E-3A+Set+Default+Encodings]. +{option -E}[rdoc-ref:@E-3A+Set+Default+Encodings]. ### `--external-encoding`: Set Default External \Encoding diff --git a/doc/language/strftime_formatting.rdoc b/doc/language/strftime_formatting.rdoc index 991a708fa4..2bfa6b975e 100644 --- a/doc/language/strftime_formatting.rdoc +++ b/doc/language/strftime_formatting.rdoc @@ -136,7 +136,7 @@ the only required part is the conversion specifier, so we begin with that. t = Time.now # => 2022-06-29 07:10:20.3230914 -0500 t.strftime('%N') # => "323091400" # Default. - Use {width specifiers}[rdoc-ref:language/strftime_formatting.rdoc@Width+Specifiers] + Use {width specifiers}[rdoc-ref:@Width+Specifiers] to adjust units: t.strftime('%3N') # => "323" # Milliseconds. @@ -522,6 +522,4 @@ An ISO 8601 combined date and time representation may be any ISO 8601 date and any ISO 8601 time, separated by the letter +T+. -For the relevant +strftime+ formats, see -{Dates}[rdoc-ref:language/strftime_formatting.rdoc@Dates] -and {Times}[rdoc-ref:language/strftime_formatting.rdoc@Times] above. +For the relevant +strftime+ formats, see {Dates}[rdoc-ref:@Dates] and {Times}[rdoc-ref:@Times] above. |
