summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorVaevictusnet <github.com@vaevictus.net>2022-09-29 13:03:14 -0500
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-04 10:07:01 +0900
commit7726f6bfff755f2b43d9138756da8b140ed08da1 (patch)
treecc5aaca7129ffdfd1b1df8f873e340512b06e4d4 /string.c
parentb2668248b67b0ac7386d6e153a7cf980306dd4db (diff)
downloadruby-7726f6bfff755f2b43d9138756da8b140ed08da1.tar.gz
Correcting example for swapcase! method
Example, line 3, swapcase! was incorrect. implied that the swapcase! did /not/ change the starting string.
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 78ac5591cc..1fd82595fe 100644
--- a/string.c
+++ b/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+;