From: Joachim Glauche Date: 2008-04-15T00:58:43+09:00 Subject: Re: noob 'why doesn't this work' question Vincent Angeloni wrote: > Hi and greetings to all group members! > > I'm a new Ruby user with a background in Applescript, Hypertalk > (Supercard), and a little Unix. I was intrigued by Matt Neuburg's > article about Applescript and Ruby, and that's what got me reading some > intro books on Ruby. I just bought Textmate and I am lovin' it! > > Anyway, I am wondering why this seemingly simple script fails: > > sizeList = [0,1,2,3,4,5,6] > countarray = [3,4,6] > countarray.each {|x| sizeList.delete_at(x)} > and the expected result should be 0,1,2,5, right? > What gives? Start counting at 0 -- Posted via http://www.ruby-forum.com/.