diff --git a/doc/string.rb b/doc/string.rb index 617cccc782..a9bff32c1a 100644 --- a/doc/string.rb +++ b/doc/string.rb @@ -427,6 +427,7 @@ # - #slice!, #[]=: Removes a substring determined by a given index, start/length, range, regexp, or substring. # - #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. # - #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 2c1e91fe8c..0d07b43a4b 100644 --- a/string.c +++ b/string.c @@ -11300,9 +11300,10 @@ deleted_prefix_length(VALUE str, VALUE prefix) * call-seq: * delete_prefix!(prefix) -> self or nil * - * Like String#delete_prefix, except that +self+ is modified in place. - * Returns +self+ if the prefix is removed, +nil+ otherwise. + * Like String#delete_prefix, except that +self+ is modified in place; + * returns +self+ if the prefix is removed, +nil+ otherwise. * + * Related: see {Modifying}[rdoc-ref:String@Modifying]. */ static VALUE