From: "J. Marshal" Date: 2011-11-27T23:15:59+09:00 Subject: Re: Creating 2-D array from 1-D array Thanks a lot for the suggestions. I also found a good tip at: http://www.java2s.com/Code/Ruby/Array/Stepwitharray.htm Now my code looks like: a = [1 , 2 , 3 , 4 , 5 , 6] b = [] (0..a.length-1).step(2) do |i| b << [a[i], a[i+1]] end print b There might also be a simple solution using slice, need to work on it. Much better! Thanks again -- Posted via http://www.ruby-forum.com/.