RDoc Documentation [ruby-doc.org]
“Funny” feature, actually only for wierdos:
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. If pattern contains groups, the respective matches will be returned in the array as well.
Leave a Reply