numThou = ids.size/1000
for i in 0..numThou
puts "START:" + (i*1000).to_s
puts "END:"+ ((i*1000)+999).to_s
puts "SIZE" + ids[i*1000,(i*1000)+999].size.to_s
end
输出:
START:0 END:999 SIZE:999
START:1000 END:1999 SIZE:1600
START:2000 END:2999 SIZE:600
这个1600大小的数组怎么可能???