ruby-changes:41188
From: yui-knk <ko1@a...>
Date: Wed, 23 Dec 2015 12:02:41 +0900 (JST)
Subject: [ruby-changes:41188] yui-knk:r53260 (trunk): * string.c: Fix document. Default value of the first
yui-knk 2015-12-23 12:02:07 +0900 (Wed, 23 Dec 2015) New Revision: 53260 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53260 Log: * string.c: Fix document. Default value of the first argument of `String#split` is not `$;` but `nil`. When `nil` is passed as first argument, `$;` is used. [ci skip] [Bug #11729] [ruby-dev:49378] Modified files: trunk/ChangeLog trunk/string.c Index: ChangeLog =================================================================== --- ChangeLog (revision 53259) +++ ChangeLog (revision 53260) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 23 11:58:52 2015 Yuichiro Kaneko <yui-knk@r...> + + * string.c: Fix document. Default value of the first + argument of `String#split` is not `$;` but `nil`. + When `nil` is passed as first argument, `$;` is used. + [ci skip] [Bug #11729] [ruby-dev:49378] + Wed Dec 23 07:15:17 2015 Eric Wong <e@8...> * ext/socket/init.c (rsock_init_sock): reject reserved FDs Index: string.c =================================================================== --- string.c (revision 53259) +++ string.c (revision 53260) @@ -6701,7 +6701,7 @@ static const char isspacetable[256] = { https://github.com/ruby/ruby/blob/trunk/string.c#L6701 /* * call-seq: - * str.split(pattern=$;, [limit]) -> anArray + * str.split(pattern=nil, [limit]) -> anArray * * Divides <i>str</i> into substrings based on a delimiter, returning an array * of these substrings. @@ -6716,8 +6716,8 @@ static const char isspacetable[256] = { https://github.com/ruby/ruby/blob/trunk/string.c#L6716 * <i>str</i> is split into individual characters. If <i>pattern</i> contains * groups, the respective matches will be returned in the array as well. * - * If <i>pattern</i> is omitted, the value of <code>$;</code> is used. If - * <code>$;</code> is <code>nil</code> (which is the default), <i>str</i> is + * If <i>pattern</i> is <code>nil</code>, the value of <code>$;</code> is used. + * If <code>$;</code> is <code>nil</code> (which is the default), <i>str</i> is * split on whitespace as if ` ' were specified. * * If the <i>limit</i> parameter is omitted, trailing null fields are -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/