Equivalent of “continue” in Ruby

后端 未结 7 1441
离开以前
离开以前 2020-12-07 07:13

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

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:50

    Ruby has two other loop/iteration control keywords: redo and retry. Read more about them, and the difference between them, at Ruby QuickTips.

提交回复
热议问题