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:
| BEGIN | END | alias | and | begin | break | case | class | def |
| module | next | nil | not | or | redo | rescue | retry | return |
| elsif | end | false | ensure | for | if | true | undef | unless |
| do | else | super | then | until | when | while | defined? | self |
These keywords cannot be used for naming variables or constants in Ruby.