From: 7stud -- Date: 2008-01-23T04:46:04+09:00 Subject: Re: Circular shift Zangief Ief wrote: > Hello everybody, > > I would like to write a simple implementation of *circular shift* > (http://en.wikipedia.org/wiki/Circular_shift). Thank you all for any > ideas :) arr = [1, 2, 3] arr << arr.shift p arr arr[0, 0] = arr.pop p arr --output:-- [2, 3, 1] [1, 2, 3] -- Posted via http://www.ruby-forum.com/.