diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-23 03:02:07 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-23 03:02:07 +0000 |
commit | 22e197dcf91cccdb3c5254447eea55ba29457535 (patch) | |
tree | 56cce583c43ad0bf006c6ffe48862f7881f69f3f /string.c | |
parent | fc6fd9a33c048b0b2b7c02d52e4fcbe9f722789c (diff) | |
download | ruby-22e197dcf91cccdb3c5254447eea55ba29457535.tar.gz |
* 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
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6701,7 +6701,7 @@ static const char isspacetable[256] = { /* * 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] = { * <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 |