From: Simon Strandgaard Date: 2004-05-31T20:04:47+09:00 Subject: Re: [bug] String#split wipes result ts wrote: > >>>>> "S" == Simon Strandgaard writes: > > S> irb(main):002:0> "abcde".split(/./) > S> => [] > > S> Why is the second result empty? > > svg% ri String#split > ----------------------------------------------------------- String#split > str.split(pattern=$;, [limit]) => anArray > ------------------------------------------------------------------------ > [...] > If the _limit_ parameter is omitted, trailing null fields are > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^n� > supressed. If _limit_ is a positive number, at most that number of > ^^^^^^^^^ [snip] > you have only null fields in the result Ahh.. I see. I just wondered what was going on. I look at RI, but not carefully enough. Thanks Guy.. I lost count of how many beers.. -- Simon Strandgaard