Skip to content

Commit 64d4e77

Browse files
[DOC] Tweaks for String#delete_suffix! (ruby#13872)
1 parent 07a3ab5 commit 64d4e77

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/string.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@
428428
# - #squeeze!: Removes contiguous duplicate characters; returns +self+.
429429
# - #delete!: Removes characters as determined by the intersection of substring arguments.
430430
# - #delete_prefix!: Removes leading prefix; returns +self+ if any changes, +nil+ otherwise.
431+
# - #delete_suffix!: Removes trailing suffix; returns +self+ if any changes, +nil+ otherwise.
431432
# - #lstrip!: Removes leading whitespace; returns +self+ if any changes, +nil+ otherwise.
432433
# - #rstrip!: Removes trailing whitespace; returns +self+ if any changes, +nil+ otherwise.
433434
# - #strip!: Removes leading and trailing whitespace; returns +self+ if any changes, +nil+ otherwise.

string.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11376,9 +11376,10 @@ deleted_suffix_length(VALUE str, VALUE suffix)
1137611376
* call-seq:
1137711377
* delete_suffix!(suffix) -> self or nil
1137811378
*
11379-
* Like String#delete_suffix, except that +self+ is modified in place.
11380-
* Returns +self+ if the suffix is removed, +nil+ otherwise.
11379+
* Like String#delete_suffix, except that +self+ is modified in place;
11380+
* returns +self+ if the suffix is removed, +nil+ otherwise.
1138111381
*
11382+
* Related: see {Modifying}[rdoc-ref:String@Modifying].
1138211383
*/
1138311384

1138411385
static VALUE

0 commit comments

Comments
 (0)