In C and many other languages, there is a continue keyword that, when used inside of a loop, jumps to the next iteration of the loop. Is there any equivalent of
continue
Writing Ian Purton's answer in a slightly more idiomatic way:
(1..5).each do |x| next if x < 2 puts x end
Prints:
2 3 4 5