Hi --

On Fri, 10 Dec 2004, trans.  (T. Onoma) wrote:

> On Thursday 09 December 2004 12:29 pm, Ibraheem Umaru-Mohammed wrote:
> | ++ trans.  (T. Onoma) [ruby-talk] [10/12/04 00:43 +0900]:
> | > That reminds me, do we have simple way to delete all empty strings from
> | > an array, like compact is for nil?
> |
> | what's wrong with using Array#delete ?
> |
> |      --ibz.
>
> Right. I was thinking #delete only removed the first match it came to. But no,
> it does remove them all. So simple enough. Thanks.
>
> BTW, I mis-tested Florian's example so disregard my last post on the subject
> -- I see the point now.

Small caveat: remember that Array#delete returns the thing deleted,
not the array, so you can't chain it as you would #compact.


David

-- 
David A. Black
dblack / wobblini.net