Reserved Words/Keywords

There are certain words that are reserved for doing specific tasks. These words are known as keywords and they have standard, predefined meaning in Ruby.

Some of the keywords available in Ruby are given below:

BEGINENDaliasandbeginbreakcaseclassdefdefined?doelse
modulenextnilnotorredorescueretryreturnselfsuperthen
elsifendfalseensureforiftrueundefunlessuntilwhenwhile

These keywords cannot be used for naming variables or constants in Ruby.