From: Malte Kuhn Date: 2012-06-17T15:47:58+09:00 Subject: [ruby-core:45680] Re: inconsistency in ruby core string split Hi Shota, I know this little piece of documentation. And i don't say it is a undocumented bug. All i want to mention about this is inconsistency. I've a list of strings and loop them through split delimiter. Unfortunately this list contains sometimes a single space. This ends in a result of checking each element vs. single space and switch to .split(/ /,2) Suppressing repetitions should not be invoked via a not uncommon string single space. A feature like suppressing contiguous (not only whitespace delimiter) characters may be a reason for a extra boolean parameter. MfG Malte On 17.06.2012 07:04, Shota Fukumori (sora_h) wrote: > hi, > > On Sun, Jun 17, 2012 at 6:45 AM, Malte Kuhn > wrote: >> Size of split result differs. > > Here's a documentation of String#split: > > http://ruby-doc.org/core-1.9.3/String.html#method-i-split >> If pattern is a single space, str is split on whitespace, with leading whitespace and runs of contiguous whitespace characters ignored. > >