summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorBurdetteLamar <[email protected]>2025-05-03 12:24:54 -0500
committerPeter Zhu <[email protected]>2025-05-04 17:14:17 -0400
commitd2de59798c286b37a901791c19991c66f5381f53 (patch)
tree2045a8bbea59b0c1838a9d9e8289953849abb9f3 /string.c
parentd71e171464a99f4f7ec735c9ef800ff3445b4a65 (diff)
[DOC] Tweaks for String#*
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13251
Diffstat (limited to 'string.c')
-rw-r--r--string.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/string.c b/string.c
index 7cafbe6dcc..d045a2cc2d 100644
--- a/string.c
+++ b/string.c
@@ -2843,13 +2843,14 @@ rb_str_opt_plus(VALUE str1, VALUE str2)
/*
* call-seq:
- * string * integer -> new_string
+ * self * n -> new_string
*
- * Returns a new +String+ containing +integer+ copies of +self+:
+ * Returns a new string containing +n+ copies of +self+:
*
- * "Ho! " * 3 # => "Ho! Ho! Ho! "
- * "Ho! " * 0 # => ""
+ * 'Ho!' * 3 # => "Ho!Ho!Ho!"
+ * 'No!' * 0 # => ""
*
+ * Related: see {Methods for Converting to New String}[rdoc-ref:String@Methods+for+Converting+to+New+String].
*/
VALUE