From 6c77a0c62b4b6221e4723a42155c7f934f1d450c Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Wed, 9 Jul 2025 12:38:28 -0500 Subject: [PATCH] [DOC] Tweaks for String#chop --- string.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/string.c b/string.c index 4f1543f6e2..5c703b4bdf 100644 --- a/string.c +++ b/string.c @@ -10131,10 +10131,12 @@ chopped_length(VALUE str) * call-seq: * chop! -> self or nil * - * Like String#chop, but modifies +self+ in place; - * returns +nil+ if +self+ is empty, +self+ otherwise. + * Like String#chop, except that: * - * Related: String#chomp!. + * - Removes trailing characters from +self+ (not from a copy of +self+). + * - Returns +self+ if any characters are removed, +nil+ otherwise. + * + * Related: see {Modifying}[rdoc-ref:String@Modifying]. */ static VALUE