The do...while loop in Ruby exists
The do..while
loop in Ruby is written begin...end while
.
It’s the begin...end
block that enables it to be executed before the condition. Without the block, the condition is executed first.
Ruby’s creator regrets this confusion and suggests writing it this way, reversing the condition (The thread on the subject).
Link to Ruby documentation for begin...end while
.