From: Dan Nachbar Date: 2011-09-04T23:53:54+09:00 Subject: Re: loops problem On Sep 4, 2011, at 10:45 AM, jack jones wrote: > I've read about the method which inserts some element in a certain place > .. > what I wanted to do is to shift all the elements to the back .. not > inserting which will require rather complicated operation like deleting > the element after shifting it .... I really don't understand the line > you wrote, thank you :) The #insert code, I think, did what your pseudo-code would have done. But, given the above, I'm a bit confused as to what you are trying to do. Perhaps an example would be clearer. For instance, given: @array = [ 0,1,2,3,4,5 ] counter = 3 What do you want @array to look like after your operation? Dan Nachbar