From: Harold Hausman Date: 2006-03-13T06:05:02+09:00 Subject: Re: array element access > I've got an array a= [1,2,3,4,5,6] and want to access each second > element: > b=[2,4,6]. How is this done in ruby? > # This is ugly, but it works: a = [1,2,3,4,5,6] (1..a.length).step(2) { |i| puts a[i] } # -Harold