1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Correcting example for swapcase! method

Example, line 3, swapcase! was incorrect. implied that the swapcase! did /not/ change the starting string.
This commit is contained in:
Vaevictusnet 2022-09-29 13:03:14 -05:00 committed by Nobuyoshi Nakada
parent b2668248b6
commit 7726f6bfff
Notes: git 2022-10-04 10:07:28 +09:00

View file

@ -7672,7 +7672,7 @@ rb_str_capitalize(int argc, VALUE *argv, VALUE str)
*
* s = 'Hello World!' # => "Hello World!"
* s.swapcase! # => "hELLO wORLD!"
* s # => "Hello World!"
* s # => "hELLO wORLD!"
* ''.swapcase! # => nil
*
* The casing may be affected by the given +options+;