Skip to content

Commit

Permalink
Update 'Set's references in docs
Browse files Browse the repository at this point in the history
- When linking to 'Set', we should use `rdoc-ref:Set` explicitly.
- "Set"'s normal usages don't need to be escaped anymore.
  • Loading branch information
st0012 committed Dec 31, 2024
1 parent 3d415e2 commit 68e728f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
60 changes: 30 additions & 30 deletions doc/ruby/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ be on good terms with all persons.

## Options

### `-0`: \Set `$/` (Input Record Separator)
### `-0`: Set `$/` (Input Record Separator)

Option `-0` defines the input record separator `$/`
for the invoked Ruby program.
Expand Down Expand Up @@ -64,9 +64,9 @@ See also:
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
\Set input field separator.
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
\Set output record separator; chop lines.
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
Expand All @@ -92,11 +92,11 @@ and the default field separator is `$;`.
See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
\Set `$/` (input record separator).
Set `$/` (input record separator).
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
\Set input field separator.
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
\Set output record separator; chop lines.
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
Expand All @@ -114,7 +114,7 @@ $ ruby -c -e 'puts "Foo"'
Syntax OK
```

### `-C`: \Set Working Directory
### `-C`: Set Working Directory

The argument to option `-C` specifies a working directory
for the invoked Ruby program;
Expand All @@ -131,7 +131,7 @@ ruby

Whitespace between the option and its argument may be omitted.

### `-d`: \Set `$DEBUG` to `true`
### `-d`: Set `$DEBUG` to `true`

Some code in (or called by) the Ruby program may include statements or blocks
conditioned by the global variable `$DEBUG` (e.g., `if $DEBUG`);
Expand Down Expand Up @@ -165,7 +165,7 @@ Whitespace between the option and its argument may be omitted.
The command may include other options,
but should not include arguments (which, if given, are ignored).

### `-E`: \Set Default Encodings
### `-E`: Set Default Encodings

Option `-E` requires an argument, which specifies either the default external encoding,
or both the default external and internal encodings for the invoked Ruby program:
Expand All @@ -187,13 +187,13 @@ Whitespace between the option and its argument may be omitted.
See also:

- {Option --external-encoding}[options_md.html#label--external-encoding-3A+Set+Default+External+Encoding]:
\Set default external encoding.
Set default external encoding.
- {Option --internal-encoding}[options_md.html#label--internal-encoding-3A+Set+Default+Internal+Encoding]:
\Set default internal encoding.
Set default internal encoding.

Option `--encoding` is an alias for option `-E`.

### `-F`: \Set Input Field Separator
### `-F`: Set Input Field Separator

Option `-F`, when given with option `-a`,
specifies that its argument is to be the input field separator to be used for splitting:
Expand Down Expand Up @@ -222,11 +222,11 @@ The argument must immediately follow the option
See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
\Set `$/` (input record separator).
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
\Set output record separator; chop lines.
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
Expand All @@ -242,7 +242,7 @@ Arguments and additional options are ignored.

For a longer help message, use option `--help`.

### `-i`: \Set \ARGF In-Place Mode
### `-i`: Set \ARGF In-Place Mode

Option `-i` sets the \ARGF in-place mode for the invoked Ruby program;
see ARGF#inplace_mode=:
Expand Down Expand Up @@ -275,7 +275,7 @@ $ popd

Whitespace between the option and its argument may be omitted.

### `-l`: \Set Output Record Separator; Chop Lines
### `-l`: Set Output Record Separator; Chop Lines

Option `-l`, when given with option `-n` or `-p`,
modifies line-ending processing by:
Expand Down Expand Up @@ -308,11 +308,11 @@ $ ruby -ln -e 'p $_' desiderata.txt
See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
\Set `$/` (input record separator).
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
\Set input field separator.
Set input field separator.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
Expand Down Expand Up @@ -342,13 +342,13 @@ be on good terms with all persons.
See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
\Set `$/` (input record separator).
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
\Set input field separator.
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
\Set output record separator; chop lines.
Set output record separator; chop lines.
- {Option -p}[rdoc-ref:ruby/options.md@p-3A+-n-2C+with+Printing]:
`-n`, with printing.

Expand All @@ -371,13 +371,13 @@ be on good terms with all persons.
See also:

- {Option -0}[rdoc-ref:ruby/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29]:
\Set `$/` (input record separator).
Set `$/` (input record separator).
- {Option -a}[rdoc-ref:ruby/options.md@a-3A+Split+Input+Lines+into+Fields]:
Split input lines into fields.
- {Option -F}[rdoc-ref:ruby/options.md@F-3A+Set+Input+Field+Separator]:
\Set input field separator.
Set input field separator.
- {Option -l}[rdoc-ref:ruby/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines]:
\Set output record separator; chop lines.
Set output record separator; chop lines.
- {Option -n}[rdoc-ref:ruby/options.md@n-3A+Run+Program+in+gets+Loop]:
Run program in `gets` loop.

Expand Down Expand Up @@ -446,7 +446,7 @@ $ ruby -S t.rb
ruby
```

### `-v`: Print Version; \Set `$VERBOSE`
### `-v`: Print Version; Set `$VERBOSE`

Options `-v` prints the Ruby version and sets global variable `$VERBOSE`:

Expand All @@ -462,7 +462,7 @@ true

Option `-w` (lowercase letter) is equivalent to option `-W1` (uppercase letter).

### `-W`: \Set \Warning Policy
### `-W`: Set \Warning Policy

Any Ruby code can create a <i>warning message</i> by calling method Kernel#warn;
methods in the Ruby core and standard libraries can also create warning messages.
Expand Down Expand Up @@ -557,7 +557,7 @@ $
If an argument is given, it must immediately follow the option
(no intervening whitespace or equal-sign character `'='`).

### `--backtrace-limit`: \Set Backtrace Limit
### `--backtrace-limit`: Set Backtrace Limit

Option `--backtrace-limit` sets a limit on the number of entries
to be displayed in a backtrace.
Expand Down Expand Up @@ -636,7 +636,7 @@ see {option --disable}[options_md.html#label--disable-3A+Disable+Features].
Option `--encoding` is an alias for
{option -E}[rdoc-ref:ruby/options.md@E-3A+Set+Default+Encodings].

### `--external-encoding`: \Set Default External \Encoding
### `--external-encoding`: Set Default External \Encoding

Option `--external-encoding`
sets the default external encoding for the invoked Ruby program;
Expand All @@ -658,7 +658,7 @@ Arguments and additional options are ignored.

For a shorter help message, use option `-h`.

### `--internal-encoding`: \Set Default Internal \Encoding
### `--internal-encoding`: Set Default Internal \Encoding

Option `--internal-encoding`
sets the default internal encoding for the invoked Ruby program;
Expand All @@ -672,7 +672,7 @@ $ ruby --internal-encoding=cesu-8 -e 'puts Encoding::default_internal'
CESU-8
```

### `--verbose`: \Set `$VERBOSE`
### `--verbose`: Set `$VERBOSE`

Option `--verbose` sets global variable `$VERBOSE` to `true`
and disables input from `$stdin`.
Expand Down
2 changes: 1 addition & 1 deletion doc/standard_library.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ of each.
- Reline ([GitHub][reline]): GNU Readline and Editline in a pure Ruby implementation
- Resolv ([GitHub][resolv]): Thread-aware DNS resolver library in Ruby
- SecureRandom ([GitHub][securerandom]): Interface for a secure random number generator
- Set ([GitHub][set]): Provides a class to deal with collections of unordered, unique values
- [Set](rdoc-ref:Set) ([GitHub][set]): Provides a class to deal with collections of unordered, unique values
- Shellwords ([GitHub][shellwords]): Manipulates strings with the word parsing rules of the UNIX Bourne shell
- Singleton ([GitHub][singleton]): Implementation of the Singleton pattern for Ruby
- Tempfile ([GitHub][tempfile]): A utility class for managing temporary files
Expand Down

0 comments on commit 68e728f

Please sign in to comment.