From 22e197dcf91cccdb3c5254447eea55ba29457535 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Wed, 23 Dec 2015 03:02:07 +0000 Subject: * 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 4f9fe51f9f..f4519ea425 100644 --- a/string.c +++ b/string.c @@ -6701,7 +6701,7 @@ static const char isspacetable[256] = { /* * call-seq: - * str.split(pattern=$;, [limit]) -> anArray + * str.split(pattern=nil, [limit]) -> anArray * * Divides str into substrings based on a delimiter, returning an array * of these substrings. @@ -6716,8 +6716,8 @@ static const char isspacetable[256] = { * str is split into individual characters. If pattern contains * groups, the respective matches will be returned in the array as well. * - * If pattern is omitted, the value of $; is used. If - * $; is nil (which is the default), str is + * If pattern is nil, the value of $; is used. + * If $; is nil (which is the default), str is * split on whitespace as if ` ' were specified. * * If the limit parameter is omitted, trailing null fields are -- cgit v1.2.3