summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-13 05:35:35 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-13 05:35:35 +0000
commit2012e7e60ede26537e9eed25e64bcbcd73dc9d5e (patch)
tree3de6e0dad8dc65278b435e6047d079fef1d91c34 /string.c
parentbc206baef895626a9fdc3457629b80585027004b (diff)
downloadruby-2012e7e60ede26537e9eed25e64bcbcd73dc9d5e.tar.gz
ruby-2012e7e60ede26537e9eed25e64bcbcd73dc9d5e.tar.xz
ruby-2012e7e60ede26537e9eed25e64bcbcd73dc9d5e.zip
Describe String#split grouping behavior. Patch by Jan Svitok [ruby-core:08603].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/string.c b/string.c
index 816dde4b0..ef065b831 100644
--- a/string.c
+++ b/string.c
@@ -3256,7 +3256,8 @@ rb_str_count(int argc, VALUE *argv, VALUE str)
*
* If <i>pattern</i> is a <code>Regexp</code>, <i>str</i> is divided where the
* pattern matches. Whenever the pattern matches a zero-length string,
- * <i>str</i> is split into individual characters.
+ * <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