From: Vincent Angeloni Date: 2008-04-15T00:47:21+09:00 Subject: noob 'why doesn't this work' question 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)} what I want to happen is that sizelist gets deleted at the positions specified in countArray, but the result I am getting is: 0 1 2 4 6 and the expected result should be 0,1,2,5, right? What gives? TIA, vince Mac OS X 10.5.2, G5 Quad, Textmate editor, ruby 1.86 -- Posted via http://www.ruby-forum.com/.