summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 0b3878b9b1..e193539f4f 100644
--- a/string.c
+++ b/string.c
@@ -6092,8 +6092,8 @@ rb_pat_search(VALUE pat, VALUE str, long pos, int set_backref_str)
* sub!(pattern, replacement) -> self or nil
* sub!(pattern) {|match| ... } -> self or nil
*
- * Returns +self+ with only the first occurrence
- * (not all occurrences) of the given +pattern+ replaced.
+ * Replaces the first occurrence (not all occurrences) of the given +pattern+
+ * on +self+; returns +self+ if a replacement occurred, +nil+ otherwise.
*
* See {Substitution Methods}[rdoc-ref:String@Substitution+Methods].
*