summaryrefslogtreecommitdiff
path: root/string.rb
diff options
context:
space:
mode:
authorHolger Just <@meine-er.de>2024-10-07 10:20:03 +0200
committer<[email protected]>2024-10-07 17:20:03 +0900
commit7081838d2a6b64308161e46296dec5dcea01f789 ()
tree5f4422d95d105da5b96cabf47ffa3886e0ffc91f /string.rb
parent32c733f57bb91e22972319ee63eac9521d954ebc (diff)
[DOC] String#sub! and String#gsub! return nil if no replacement occured
Notes: Merged: https://.com/ruby/ruby/pull/11700 Merged-By: nobu <[email protected]>
-rw-r--r--string.rb6
1 files changed, 4 insertions, 2 deletions
@@ -29,9 +29,11 @@
# These methods perform substitutions:
#
# - String#sub: One substitution (or none); returns a new string.
-# - String#sub!: One substitution (or none); returns +self+.
# - String#gsub: Zero or more substitutions; returns a new string.
-# - String#gsub!: Zero or more substitutions; returns +self+.
#
# Each of these methods takes:
#