From 6fbe2dd36e30a2ecbfa770d3ebfbb8e601d97bd3 Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Thu, 21 Aug 2025 17:36:09 -0500 Subject: [DOC] Tweaks for String#insert --- string.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 0329d2845a..d873d93d8f 100644 --- a/string.c +++ b/string.c @@ -6056,19 +6056,9 @@ rb_str_aset_m(int argc, VALUE *argv, VALUE str) /* * call-seq: - * insert(index, other_string) -> self + * insert(offset, other_string) -> self * - * Inserts the given +other_string+ into +self+; returns +self+. - * - * If the Integer +index+ is positive, inserts +other_string+ at offset +index+: - * - * 'foo'.insert(1, 'bar') # => "fbaroo" - * - * If the Integer +index+ is negative, counts backward from the end of +self+ - * and inserts +other_string+ at offset index+1 - * (that is, _after_ self[index]): - * - * 'foo'.insert(-2, 'bar') # => "fobaro" + * :include: doc/string/insert.rdoc * */ -- cgit v1.2.3