Question about "do" keyword in loop of ruby


#1

I skip to write "do" keyword in behind of keywords "while", "for", "until", and it works accurately. However, I cannot skip to write the keyword when I am using "loop" keyword to loop because Ruby interpreter on codecademy.com says error. What does "do" keyword do? Why I cannot skip "do" keyword when I use "loop" keyword to loop?


#2

It's just a standard for the language. That is the way it is and you should follow it if you want things to work as desired.