From: Stuart Little Date: 2009-02-12T08:38:26+09:00 Subject: Re: Array uniq Up and running now thanks Rick Denatale wrote: > On Wed, Feb 11, 2009 at 5:33 PM, Stuart Little < > stuart_clarke1986@hotmail.co.uk> wrote: >> That makes sense but how do I avoid this? I cant see how. I need to >> dedupe before the data goes into @alerts. > David and I are trying to tell you the same thing. > My last attempt to get through > date = "TueAug052008" > dateCheck = [] > alerts = [] > 5.times do > dateCheck.push date > alerts.push(date) unless alerts.include?(date) > end > puts "at end alerts is #{alerts.inspect}" > puts " and dateCheck is #{dateCheck.inspect}" > at end alerts is ["TueAug052008"] > and dateCheck is ["TueAug052008", "TueAug052008", "TueAug052008", > "TueAug052008", "TueAug052008"] > > -- > Rick DeNatale > > Blog: http://talklikeaduck.denhaven2.com/ > Twitter: http://twitter.com/RickDeNatale -- Posted via http://www.ruby-forum.com/.