[DOC] Tweaks for String#chop

This commit is contained in:
BurdetteLamar 2025-07-09 12:38:28 -05:00 committed by Peter Zhu
parent 3baed2ea38
commit 6c77a0c62b

View file

@ -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