>>749
まあそんなとこだろうな
処理全部自前だからめんどくさいが

class Array
def slice2(index, length, stride)
res = Array.new
self.each_with_index do |e, i|
res << e if ((index <= i) && (res.size < length) && ((i - index) % stride).zero?)
end
res
end
end

p ["a", "b", "c", "d", "e", "f"].slice2(0,3,2) #=> ["a", "c", "e"]
p ["a", "b", "c", "d", "e", "f"].slice2(3,2,1) #=> ["d", "e"]

ていうかそもそもこれでいいのか? なんか需要違わね?