Keyword
Keyword Array Hash String 2D Case Class Console Convert DateTime Duplicates Exception File Format If Iterator Math Method Nil Number Recursion Regexp Set Sort Split Sub Substring While
Keywords. Ruby is object-oriented. Most actions we take are done with methods, part of classes. Iterators (methods) replace loops. The language thus needs fewer keywords.
Ruby Core. Ruby is a scripting language, so its implementation (Ruby Core) is the best source for information on its keywords. This list was built from its code.alias
yield
Some methods. Ruby provides methods that are often used. These are not keywords, but are available in all places in programs. They are useful.p()printputs
Certain keywords, like undef, are rarely used. But learning how they work helps us understand the Ruby language in a more complete way.
In modern Ruby programs, constructs like for-loops are avoided. We find that iterators (like upto and times) are a clearer approach. But these keywords are still provided.