summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-07-09 13:01:57 -0500
committerPeter Zhu <peter@peterzhu.ca>2025-07-09 14:42:19 -0400
commitb146eae3b5e9154d3fb692e8fee200d602f57149 (patch)
tree5e4119779a77c8dbaf49f9f4c7c42888dc15bc2d /string.c
parent6c77a0c62b4b6221e4723a42155c7f934f1d450c (diff)
[DOC] Tweaks for String#clear
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/string.c b/string.c
index 5c703b4bdf..f61f1cd0a0 100644
--- a/string.c
+++ b/string.c
@@ -6666,9 +6666,11 @@ rb_str_replace(VALUE str, VALUE str2)
*
* Removes the contents of +self+:
*
- * s = 'foo' # => "foo"
- * s.clear # => ""
+ * s = 'foo'
+ * s.clear # => ""
+ * s # => ""
*
+ * Related: see {Modifying}[rdoc-ref:String@Modifying].
*/
static VALUE