From: 7stud -- Date: 2011-09-04T23:53:10+09:00 Subject: Re: loops problem jack jones wrote in post #1020048: > for (j = @array.length ; j > counter ; j = j-1) # counter is a variable > @array[j+1] = @array[j] > end > > obviously this loop is invalid in ruby .. can any one tell me something > equivalent to it ? There is no element in an array at the index array.length, and there is no element in an array at the index array.length + 1. So what language is that code valid in? -- Posted via http://www.ruby-forum.com/.