The interactive Ruby tool should be used throughout learning Ruby. It provides an interface to the Ruby language for instant experimentation. This comes in handy while learning Ruby and experimenting with things like regular expressions.
When you learn about a new feature or just want to try something, start up the interactive Ruby prompt and try it. See what the statement returns, pass different parameters to it and just do some general experimenting. Trying something yourself and seeing what it does can be a lot more valuable then just reading about it!
Ruby statements can be run and the output and return values can be examined immediately. If you make a mistake, you can go back and edit your previous Ruby statements to correct those mistakes.
To start the IRB prompt, open your command-line and run the irb command. You'll be presented with the following prompt: