summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-10-23 23:07:54 +0100
committerPeter Zhu <peter@peterzhu.ca>2025-10-24 18:09:32 -0400
commit245df86ec3ed30cb844a16b5a4df7e4d91d7c293 (patch)
tree9806eb6c8880b1d753257bd23cbb92309b6291a1 /string.c
parent8b6564d1493a59d437dd88b4cdfad44ca2889138 (diff)
[DOC] Tweaks for String#sub
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/string.c b/string.c
index 55a7eebc5a..824c04a5b2 100644
--- a/string.c
+++ b/string.c
@@ -6361,13 +6361,7 @@ rb_str_sub_bang(int argc, VALUE *argv, VALUE str)
* sub(pattern, replacement) -> new_string
* sub(pattern) {|match| ... } -> new_string
*
- * Returns a copy of +self+ with only the first occurrence
- * (not all occurrences) of the given +pattern+ replaced.
- *
- * See {Substitution Methods}[rdoc-ref:String@Substitution+Methods].
- *
- * Related: String#sub!, String#gsub, String#gsub!.
- *
+ * :include: doc/string/sub.rdoc
*/
static VALUE