diff --git a/doc/string.rb b/doc/string.rb index a9bff32c1a..d68b40743b 100644 --- a/doc/string.rb +++ b/doc/string.rb @@ -428,6 +428,7 @@ # - #squeeze!: Removes contiguous duplicate characters; returns +self+. # - #delete!: Removes characters as determined by the intersection of substring arguments. # - #delete_prefix!: Removes leading prefix; returns +self+ if any changes, +nil+ otherwise. +# - #delete_suffix!: Removes trailing suffix; returns +self+ if any changes, +nil+ otherwise. # - #lstrip!: Removes leading whitespace; returns +self+ if any changes, +nil+ otherwise. # - #rstrip!: Removes trailing whitespace; returns +self+ if any changes, +nil+ otherwise. # - #strip!: Removes leading and trailing whitespace; returns +self+ if any changes, +nil+ otherwise. diff --git a/string.c b/string.c index 0d07b43a4b..c425eb56f0 100644 --- a/string.c +++ b/string.c @@ -11376,9 +11376,10 @@ deleted_suffix_length(VALUE str, VALUE suffix) * call-seq: * delete_suffix!(suffix) -> self or nil * - * Like String#delete_suffix, except that +self+ is modified in place. - * Returns +self+ if the suffix is removed, +nil+ otherwise. + * Like String#delete_suffix, except that +self+ is modified in place; + * returns +self+ if the suffix is removed, +nil+ otherwise. * + * Related: see {Modifying}[rdoc-ref:String@Modifying]. */ static VALUE