From 41a486e96685fbd34aa356d43da18491c6da828d Mon Sep 17 00:00:00 2001 From: stomar Date: Sat, 13 Oct 2018 19:04:02 +0000 Subject: [PATCH] string.c: [DOC] add example code for String#strip! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/string.c b/string.c index 60cb5542ce..691e99eca9 100644 --- a/string.c +++ b/string.c @@ -8981,6 +8981,9 @@ rb_str_rstrip(VALUE str) * nil if str was not altered. * * Refer to strip for the definition of whitespace. + * + * " hello ".strip! #=> "hello" + * "hello".strip! #=> nil */ static VALUE