ary=[1,2,3] ary.each do |i| puts i i+=1 redo if i==2 end
输出:1 2 2 3
ary=[1,2,3] ary.each do |i| puts i i+=1 retry if i==2 end
输出:死循环 1