From: Jeff Wood Date: 2005-11-26T09:13:38+09:00 Subject: Re: Faster way to pick the every other array member? ------=_Part_6752_4147753.1132964012276 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I'm kind of surprised that you don't get an array of values back if you cal= l Range#step(x) without a block. That would make things much easier ... a.values_at( (2..6).step(2) ) ... at least, that is what would make sense to me ... anybody else? j. On 11/25/05, jzakiya@mail.com wrote: > > res=3D[]; 1.step(a.size-1,2) {|n| res << a[n] } > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood ------=_Part_6752_4147753.1132964012276--