ruby-changes:46454
From: stomar <ko1@a...>
Date: Thu, 4 May 2017 22:19:49 +0900 (JST)
Subject: [ruby-changes:46454] stomar:r58569 (trunk): string.c: [DOC] improve docs for String.new
stomar 2017-05-04 22:19:43 +0900 (Thu, 04 May 2017) New Revision: 58569 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58569 Log: string.c: [DOC] improve docs for String.new Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 58568) +++ string.c (revision 58569) @@ -1447,19 +1447,21 @@ rb_str_resurrect(VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L1447 /* * call-seq: - * String.new(str="") -> new_str - * String.new(str="", encoding: enc) -> new_str - * String.new(str="", capacity: size) -> new_str + * String.new(str="") -> new_str + * String.new(str="", encoding: enc) -> new_str + * String.new(str="", capacity: size) -> new_str * * Returns a new string object containing a copy of <i>str</i>. * - * The optional <i>encoding</i> argument specifies the encoding of the new string. - * If not specified, the encoding of <i>str</i> (or ASCII-8BIT, if <i>str</i> - * is not specified) is used. + * The optional <i>encoding</i> keyword argument specifies the encoding + * of the new string. + * If not specified, the encoding of <i>str</i> is used + * (or ASCII-8BIT, if <i>str</i> is not specified). * - * The optional <i>capacity</i> argument specifies the size of internal buffer. + * The optional <i>capacity</i> keyword argument specifies the size + * of the internal buffer. * This may improve performance, when the string will be concatenated many - * times (and call many realloc). + * times (causing many realloc calls). */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/