From af574c63b593cb489ceccc15a2b38583fa396e76 Mon Sep 17 00:00:00 2001 From: marcandre Date: Thu, 29 Jan 2015 15:56:58 +0000 Subject: [PATCH] * string.c: [DOC] Specify to_s on subclasses [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/string.c b/string.c index b3204fce2d..5de795a29a 100644 --- a/string.c +++ b/string.c @@ -4877,7 +4877,9 @@ rb_str_to_f(VALUE str) * str.to_s -> str * str.to_str -> str * - * Returns the receiver. + * Returns +self+. + * + * If called on a subclass of String, converts the receiver to a String object. */ static VALUE