split array to sub array by step in Ruby
In Python i can slice array with "jump-step". Example: In [1]: a = [1,2,3,4,5,6,7,8,9] In [4]: a[1:7:2] # start from index = 1 to index < 7, with step = 2 Out[4]: [2, 4, 6] Can Ruby do it?