From: Jan Svitok Date: 2006-08-13T04:43:18+09:00 Subject: [PATCH] String#split rdoc ------=_Part_102244_16465915.1155411795177 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, this is a little patch (against head) that add a mention of groups in separator for String#split. Perhaps someone could reformulate it better. I personally haven't noticed this behaviour before, and it's quite a useful feature. Jano --- string.c.orig 2006-08-12 21:31:57.000000000 +0200 +++ string.c 2006-08-12 21:35:29.048713000 +0200 @@ -3442,7 +3442,8 @@ * * 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 ------=_Part_102244_16465915.1155411795177 Content-Type: text/x-patch; name=string-split.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_eqse6ks1 Content-Disposition: attachment; filename="string-split.patch" LS0tIHN0cmluZy5jLm9yaWcJMjAwNi0wOC0xMiAyMTozMTo1Ny4wMDAwMDAwMDAgKzAyMDAKKysr IHN0cmluZy5jCTIwMDYtMDgtMTIgMjE6MzU6MjkuMDQ4NzEzMDAwICswMjAwCkBAIC0zNDQyLDcg KzM0NDIsOCBAQAogICogICAgIAogICogIElmIDxpPnBhdHRlcm48L2k+IGlzIGEgPGNvZGU+UmVn ZXhwPC9jb2RlPiwgPGk+c3RyPC9pPiBpcyBkaXZpZGVkIHdoZXJlIHRoZQogICogIHBhdHRlcm4g bWF0Y2hlcy4gV2hlbmV2ZXIgdGhlIHBhdHRlcm4gbWF0Y2hlcyBhIHplcm8tbGVuZ3RoIHN0cmlu ZywKLSAqICA8aT5zdHI8L2k+IGlzIHNwbGl0IGludG8gaW5kaXZpZHVhbCBjaGFyYWN0ZXJzLgor ICogIDxpPnN0cjwvaT4gaXMgc3BsaXQgaW50byBpbmRpdmlkdWFsIGNoYXJhY3RlcnMuIElmIDxp PnBhdHRlcm48L2k+IGNvbnRhaW5zCisgKiAgZ3JvdXBzLCB0aGUgcmVzcGVjdGl2ZSBtYXRjaGVz IHdpbGwgYmUgcmV0dXJuZWQgaW4gdGhlIGFycmF5IGFzIHdlbGwuCiAgKiAgICAgCiAgKiAgSWYg PGk+cGF0dGVybjwvaT4gaXMgb21pdHRlZCwgdGhlIHZhbHVlIG9mIDxjb2RlPiQ7PC9jb2RlPiBp cyB1c2VkLiAgSWYKICAqICA8Y29kZT4kOzwvY29kZT4gaXMgPGNvZGU+bmlsPC9jb2RlPiAod2hp Y2ggaXMgdGhlIGRlZmF1bHQpLCA8aT5zdHI8L2k+IGlzCg== ------=_Part_102244_16465915.1155411795177--