From 8b827f1a7d5828bdee506da5cc8f42ce54f589bd Mon Sep 17 00:00:00 2001 From: drbrain Date: Sun, 13 Aug 2006 05:35:35 +0000 Subject: [PATCH] Describe String#split grouping behavior. Patch by Jan Svitok [ruby-core:08603]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6e8cfd0d3d..10183999da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Aug 12 22:33:06 2006 Eric Hodel + + * string.c (String#split): Describe grouping behavior. Patch by Jan + Svitok . [ruby-core:08603] + Sun Aug 13 12:08:02 2006 Tanaka Akira * ext/socket/socket.c: ANSIfied. [ruby-core:08601] diff --git a/string.c b/string.c index 816dde4b0b..ef065b831f 100644 --- a/string.c +++ b/string.c @@ -3256,7 +3256,8 @@ rb_str_count(int argc, VALUE *argv, VALUE str) * * If pattern is a Regexp, str is divided where the * pattern matches. Whenever the pattern matches a zero-length string, - * str is split into individual characters. + * 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