Signup/Sign In

Reserved Words/Keywords in Ruby

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:

BEGINENDaliasandbeginbreakcaseclassdef
modulenextnilnotorredorescueretryreturn
elsifendfalseensureforiftrueundefunless
doelsesuperthenuntilwhenwhiledefined?self

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