Use next : (1..10).each do |a| next if a.even? puts a end. prints: 1 3 5 7 9. For additional coolness check out also redo and retry .
確定! 回上一頁