From: Sam Larbi Date: 2007-11-29T07:32:04+09:00 Subject: Re: Removing duplicates and substrings from an array ------=_Part_7541_29367896.1196289126831 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Everyone, On Nov 26, 2007 11:51 AM, Lionel Bouton wrote: > Sebastian Hungerecker wrote the following on 26.11.2007 18:27 : > > Lionel Bouton wrote: > > > >> arr.reject {|a| arr.any? {|b| b != a and a.index(b) } } > >> > > > > I'd make that index into include? because you don't really care about > the > > index here. > > > > I agree, the code is then easier to read too. > That's precisely what I was looking for (or felt like I should be doing). Thanks to all for their help! Sam ------=_Part_7541_29367896.1196289126831--