1 2 3 4 5 6 7 8 9 |
|
From the ruby docs:
If pattern is a single space, str is split on whitespace, with leading whitespace and runs of contiguous whitespace characters ignored.
Note that split by regex without groups omits trailing matches. Undocumented?