diff options
author | Vaevictusnet <[email protected]> | 2022-09-29 13:03:14 -0500 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-10-04 10:07:01 +0900 |
commit | 7726f6bfff755f2b43d9138756da8b140ed08da1 (patch) | |
tree | cc5aaca7129ffdfd1b1df8f873e340512b06e4d4 /string.c | |
parent | b2668248b67b0ac7386d6e153a7cf980306dd4db (diff) |
Correcting example for swapcase! method
Example, line 3, swapcase! was incorrect. implied that the swapcase! did /not/ change the starting string.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6474
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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+; |