From 7726f6bfff755f2b43d9138756da8b140ed08da1 Mon Sep 17 00:00:00 2001 From: Vaevictusnet Date: Thu, 29 Sep 2022 13:03:14 -0500 Subject: [PATCH] Correcting example for swapcase! method Example, line 3, swapcase! was incorrect. implied that the swapcase! did /not/ change the starting string. --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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+;