Skip to content

Commit 37c7ee5

Browse files
authored
[DOC] Replace rdoc style codeblocks with markdown style backtick codeblocks in markdown documents (ruby#15900)
1 parent 43d879d commit 37c7ee5

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

doc/contributing/documentation_guide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,16 @@ and _never_ when referring to the class itself.
265265

266266
When writing an explicit link, follow these guidelines.
267267

268-
#### +rdoc-ref+ Scheme
268+
#### `rdoc-ref` Scheme
269269

270-
Use the +rdoc-ref+ scheme for:
270+
Use the `rdoc-ref` scheme for:
271271

272272
- A link in core documentation to other core documentation.
273273
- A link in core documentation to documentation in a standard library package.
274274
- A link in a standard library package to other documentation in that same
275275
standard library package.
276276

277-
See section "+rdoc-ref+ Scheme" in [links].
277+
See section "`rdoc-ref` Scheme" in [links].
278278

279279
#### URL-Based Link
280280

@@ -297,7 +297,7 @@ The name of a variable (as specified in its call-seq) should be marked up as
297297
[monofont].
298298

299299
Also, use monofont text for the name of a transient variable
300-
(i.e., one defined and used only in the discussion, such as +n+).
300+
(i.e., one defined and used only in the discussion, such as `n`).
301301

302302
### HTML Tags
303303

@@ -491,10 +491,10 @@ Return types:
491491
492492
- If the method can return multiple different types,
493493
separate the types with "or" and, if necessary, commas.
494-
- If the method can return multiple types, use +object+.
495-
- If the method returns the receiver, use +self+.
494+
- If the method can return multiple types, use `object`.
495+
- If the method returns the receiver, use `self`.
496496
- If the method returns an object of the same class,
497-
prefix `new_` if and only if the object is not +self+;
497+
prefix `new_` if and only if the object is not `self`;
498498
example: `new_array`.
499499
500500
Aliases:

doc/language/exceptions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -504,18 +504,18 @@ These methods return backtrace information:
504504
By default, Ruby sets the backtrace of the exception to the location where it
505505
was raised.
506506

507-
The developer might adjust this by either providing +backtrace+ argument
507+
The developer might adjust this by either providing `backtrace` argument
508508
to Kernel#raise, or using Exception#set_backtrace.
509509

510510
Note that:
511511

512-
- by default, both +backtrace+ and +backtrace_locations+ represent the same backtrace;
512+
- by default, both `backtrace` and `backtrace_locations` represent the same backtrace;
513513
- if the developer sets the backtrace by one of the above methods to an array of
514514
Thread::Backtrace::Location, they still represent the same backtrace;
515515
- if the developer sets the backtrace to a string or an array of strings:
516-
- by Kernel#raise: +backtrace_locations+ become +nil+;
517-
- by Exception#set_backtrace: +backtrace_locations+ preserve the original
516+
- by Kernel#raise: `backtrace_locations` become `nil`;
517+
- by Exception#set_backtrace: `backtrace_locations` preserve the original
518518
value;
519-
- if the developer sets the backtrace to +nil+ by Exception#set_backtrace,
520-
+backtrace_locations+ preserve the original value; but if the exception is then
521-
reraised, both +backtrace+ and +backtrace_locations+ become the location of reraise.
519+
- if the developer sets the backtrace to `nil` by Exception#set_backtrace,
520+
`backtrace_locations` preserve the original value; but if the exception is then
521+
reraised, both `backtrace` and `backtrace_locations` become the location of reraise.

doc/language/options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ Option `--encoding` is an alias for
640640

641641
Option `--external-encoding`
642642
sets the default external encoding for the invoked Ruby program;
643-
for values of +encoding+,
643+
for values of `encoding`,
644644
see {Encoding: Names and Aliases}[rdoc-ref:encodings.rdoc@Names+and+Aliases].
645645

646646
```console
@@ -662,7 +662,7 @@ For a shorter help message, use option `-h`.
662662

663663
Option `--internal-encoding`
664664
sets the default internal encoding for the invoked Ruby program;
665-
for values of +encoding+,
665+
for values of `encoding`,
666666
see {Encoding: Names and Aliases}[rdoc-ref:encodings.rdoc@Names+and+Aliases].
667667

668668
```console

file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5557,7 +5557,7 @@ rb_thread_flock(void *data)
55575557
* call-seq:
55585558
* flock(locking_constant) -> 0 or false
55595559
*
5560-
* Locks or unlocks file +self+ according to the given `locking_constant`,
5560+
* Locks or unlocks file `self` according to the given `locking_constant`,
55615561
* a bitwise OR of the values in the table below.
55625562
*
55635563
* Not available on all platforms.
@@ -5567,10 +5567,10 @@ rb_thread_flock(void *data)
55675567
*
55685568
* | Constant | Lock | Effect
55695569
* |-----------------|--------------|-----------------------------------------------------------------------------------------------------------------|
5570-
* | +File::LOCK_EX+ | Exclusive | Only one process may hold an exclusive lock for +self+ at a time. |
5571-
* | +File::LOCK_NB+ | Non-blocking | No blocking; may be combined with +File::LOCK_SH+ or +File::LOCK_EX+ using the bitwise OR operator <tt>\|</tt>. |
5572-
* | +File::LOCK_SH+ | Shared | Multiple processes may each hold a shared lock for +self+ at the same time. |
5573-
* | +File::LOCK_UN+ | Unlock | Remove an existing lock held by this process. |
5570+
* | `File::LOCK_EX` | Exclusive | Only one process may hold an exclusive lock for `self` at a time. |
5571+
* | `File::LOCK_NB` | Non-blocking | No blocking; may be combined with `File::LOCK_SH` or `File::LOCK_EX` using the bitwise OR operator <tt>\|</tt>. |
5572+
* | `File::LOCK_SH` | Shared | Multiple processes may each hold a shared lock for `self` at the same time. |
5573+
* | `File::LOCK_UN` | Unlock | Remove an existing lock held by this process. |
55745574
*
55755575
* Example:
55765576
*
@@ -5697,11 +5697,11 @@ test_check(int n, int argc, VALUE *argv)
56975697
* | <tt>'z'</tt> | Whether the entity exists and is of length zero. |
56985698
*
56995699
* - This test operates only on the entity at `path0`,
5700-
* and returns an integer size or +nil+:
5700+
* and returns an integer size or `nil`:
57015701
*
57025702
* | Character | Test |
57035703
* |:------------:|:---------------------------------------------------------------------------------------------|
5704-
* | <tt>'s'</tt> | Returns positive integer size if the entity exists and has non-zero length, +nil+ otherwise. |
5704+
* | <tt>'s'</tt> | Returns positive integer size if the entity exists and has non-zero length, `nil` otherwise. |
57055705
*
57065706
* - Each of these tests operates only on the entity at `path0`,
57075707
* and returns a Time object;

0 commit comments

Comments
 (0)