From: Ehsanul Hoque Date: 2010-01-01T14:42:51+09:00 Subject: Re: Delete elements in array, break, and keep changes? --_4421ad1a-26ef-4b86-a2f3-230663d86bf9_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > I have an array of a lot elements that I need to cluster (they are > latitudes and longitudes). >=20 > As I iterate the array I want to remove elements that I have already > clustered. >=20 In this case=2C it looks like Array#shift might work=2C though I'm not sure= I totally understand your requirements. Something like: until long_lat_array.empty? long_lat =3D long_lat_array.shift cluster(long_lat) end Hope I'm not missing your issue. - Ehsan =20 _________________________________________________________________ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/= --_4421ad1a-26ef-4b86-a2f3-230663d86bf9_--