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:
parent
b2668248b6
commit
7726f6bfff
Notes:
git
2022-10-04 10:07:28 +09:00
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -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+;
|
||||
|
|
Loading…
Reference in a new issue