From: Michael Campbell Date: 2003-06-26T22:45:37+09:00 Subject: Re: String#split(' ') and whitespace (perl user's surprise) Does that sound like a bug to you? -----Original Message----- From: ts [mailto:decoux@moulon.inra.fr] Sent: Thursday, June 26, 2003 8:38 AM To: ruby-talk ML Cc: ruby-talk@ruby-lang.org Subject: Re: String#split(' ') and whitespace (perl user's surprise) >>>>> "W" == Wesley J Landaker writes: W> This seems like a ruby bug: limit seems to be counting whitespace W> characters and not whitespace "runs" when ' ' is given as the pattern. W> But maybe it's a documentation bug. Who knows? Well, to see what it do svg% ruby -e 'p "a b".split(" ", 2); p "a b".split(" ", 2);' ["a", "b"] ["a", " b"] svg% it remove just the first space when it has a limit parameter Guy Decoux