diff --git a/doc/contributing/documentation_guide.md b/doc/contributing/documentation_guide.md
index 29a1c72b02..4b1e2ac9ad 100644
--- a/doc/contributing/documentation_guide.md
+++ b/doc/contributing/documentation_guide.md
@@ -265,16 +265,16 @@ and _never_ when referring to the class itself.
When writing an explicit link, follow these guidelines.
-#### +rdoc-ref+ Scheme
+#### `rdoc-ref` Scheme
-Use the +rdoc-ref+ scheme for:
+Use the `rdoc-ref` scheme for:
- A link in core documentation to other core documentation.
- A link in core documentation to documentation in a standard library package.
- A link in a standard library package to other documentation in that same
standard library package.
-See section "+rdoc-ref+ Scheme" in [links].
+See section "`rdoc-ref` Scheme" in [links].
#### URL-Based Link
@@ -297,7 +297,7 @@ The name of a variable (as specified in its call-seq) should be marked up as
[monofont].
Also, use monofont text for the name of a transient variable
-(i.e., one defined and used only in the discussion, such as +n+).
+(i.e., one defined and used only in the discussion, such as `n`).
### HTML Tags
@@ -491,10 +491,10 @@ Return types:
- If the method can return multiple different types,
separate the types with "or" and, if necessary, commas.
-- If the method can return multiple types, use +object+.
-- If the method returns the receiver, use +self+.
+- If the method can return multiple types, use `object`.
+- If the method returns the receiver, use `self`.
- If the method returns an object of the same class,
- prefix `new_` if and only if the object is not +self+;
+ prefix `new_` if and only if the object is not `self`;
example: `new_array`.
Aliases:
diff --git a/doc/language/exceptions.md b/doc/language/exceptions.md
index 2c47455911..5f8f0ece69 100644
--- a/doc/language/exceptions.md
+++ b/doc/language/exceptions.md
@@ -504,18 +504,18 @@ These methods return backtrace information:
By default, Ruby sets the backtrace of the exception to the location where it
was raised.
-The developer might adjust this by either providing +backtrace+ argument
+The developer might adjust this by either providing `backtrace` argument
to Kernel#raise, or using Exception#set_backtrace.
Note that:
-- by default, both +backtrace+ and +backtrace_locations+ represent the same backtrace;
+- by default, both `backtrace` and `backtrace_locations` represent the same backtrace;
- if the developer sets the backtrace by one of the above methods to an array of
Thread::Backtrace::Location, they still represent the same backtrace;
- if the developer sets the backtrace to a string or an array of strings:
- - by Kernel#raise: +backtrace_locations+ become +nil+;
- - by Exception#set_backtrace: +backtrace_locations+ preserve the original
+ - by Kernel#raise: `backtrace_locations` become `nil`;
+ - by Exception#set_backtrace: `backtrace_locations` preserve the original
value;
-- if the developer sets the backtrace to +nil+ by Exception#set_backtrace,
- +backtrace_locations+ preserve the original value; but if the exception is then
- reraised, both +backtrace+ and +backtrace_locations+ become the location of reraise.
+- if the developer sets the backtrace to `nil` by Exception#set_backtrace,
+ `backtrace_locations` preserve the original value; but if the exception is then
+ reraised, both `backtrace` and `backtrace_locations` become the location of reraise.
diff --git a/doc/language/options.md b/doc/language/options.md
index cca87f42de..3421d73f55 100644
--- a/doc/language/options.md
+++ b/doc/language/options.md
@@ -640,7 +640,7 @@ Option `--encoding` is an alias for
Option `--external-encoding`
sets the default external encoding for the invoked Ruby program;
-for values of +encoding+,
+for values of `encoding`,
see {Encoding: Names and Aliases}[rdoc-ref:encodings.rdoc@Names+and+Aliases].
```console
@@ -662,7 +662,7 @@ For a shorter help message, use option `-h`.
Option `--internal-encoding`
sets the default internal encoding for the invoked Ruby program;
-for values of +encoding+,
+for values of `encoding`,
see {Encoding: Names and Aliases}[rdoc-ref:encodings.rdoc@Names+and+Aliases].
```console
diff --git a/file.c b/file.c
index 2ed3672ea7..867b041a44 100644
--- a/file.c
+++ b/file.c
@@ -5557,7 +5557,7 @@ rb_thread_flock(void *data)
* call-seq:
* flock(locking_constant) -> 0 or false
*
- * Locks or unlocks file +self+ according to the given `locking_constant`,
+ * Locks or unlocks file `self` according to the given `locking_constant`,
* a bitwise OR of the values in the table below.
*
* Not available on all platforms.
@@ -5567,10 +5567,10 @@ rb_thread_flock(void *data)
*
* | Constant | Lock | Effect
* |-----------------|--------------|-----------------------------------------------------------------------------------------------------------------|
- * | +File::LOCK_EX+ | Exclusive | Only one process may hold an exclusive lock for +self+ at a time. |
- * | +File::LOCK_NB+ | Non-blocking | No blocking; may be combined with +File::LOCK_SH+ or +File::LOCK_EX+ using the bitwise OR operator \|. |
- * | +File::LOCK_SH+ | Shared | Multiple processes may each hold a shared lock for +self+ at the same time. |
- * | +File::LOCK_UN+ | Unlock | Remove an existing lock held by this process. |
+ * | `File::LOCK_EX` | Exclusive | Only one process may hold an exclusive lock for `self` at a time. |
+ * | `File::LOCK_NB` | Non-blocking | No blocking; may be combined with `File::LOCK_SH` or `File::LOCK_EX` using the bitwise OR operator \|. |
+ * | `File::LOCK_SH` | Shared | Multiple processes may each hold a shared lock for `self` at the same time. |
+ * | `File::LOCK_UN` | Unlock | Remove an existing lock held by this process. |
*
* Example:
*
@@ -5697,11 +5697,11 @@ test_check(int n, int argc, VALUE *argv)
* | 'z' | Whether the entity exists and is of length zero. |
*
* - This test operates only on the entity at `path0`,
- * and returns an integer size or +nil+:
+ * and returns an integer size or `nil`:
*
* | Character | Test |
* |:------------:|:---------------------------------------------------------------------------------------------|
- * | 's' | Returns positive integer size if the entity exists and has non-zero length, +nil+ otherwise. |
+ * | 's' | Returns positive integer size if the entity exists and has non-zero length, `nil` otherwise. |
*
* - Each of these tests operates only on the entity at `path0`,
* and returns a Time object;