From: Patrick Doyle Date: 2008-08-25T21:38:25+09:00 Subject: Re: indices of non nil elements in an array On Mon, Aug 25, 2008 at 8:22 AM, wrote: > That can be made even more elegant: > > a.reject (/e/ e.nil?) > But that won't return the indices of the the non-nil elements, instead it extracts the non-nil elements from the array (which is the same thing that Array#compact) does. --wpd