I have the following ruby code block:
x = 1
next unless (x % 2) == 0
break if x >=10
(x % 2) ==0
next statement means to go back to the beginning of the loop. I think that's what you are missing.
x is odd, then
(x % 2) == 0 is false, so the
next statement is executed, which causes the program to skip running the rest of the loop. This means that odd numbers never get printed.