From: leon breedt Date: 2005-01-05T10:28:28+09:00 Subject: Re: Think I need an Array#split On Wed, 5 Jan 2005 10:04:08 +0900, Bertram Scharpf wrote: > I made both solutions available at > . I had a look, perhaps it could emulate String#split by performing an "awk split" (on whitespace) if there is no delimiter argument given? Also, allowing a Regexp as a delimiter would further emulate the String#split functionality. > P.S.: For those who look at the C code: is it OK not to > destroy the last `cur' object? Its fine, Ruby uses a mark-and-sweep GC, so unless you've explicitly marked 'cur' yourself (pushing it onto another array will cause it to get marked automatically), it will get destroyed at the next GC run. Regards Leon