From: Harry Date: 2007-04-29T10:29:14+09:00 Subject: Re: cyclic array ------=_Part_61058_14367878.1177810114732 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 4/28/07, Josselin wrote: > > > what could be the simplest way to do it ? no simple way using Array > class methods only , > > Try something like this. arr = ("a".."g").to_a (1..25).each do |d| arr.push << arr.shift p arr.slice(0..5) end Harry -- http://www.kakueki.com/ruby/list.html A Look into Japanese Ruby List in English ------=_Part_61058_14367878.1177810114732--