2.4. irb

irb stands for Interactive Ruby and is a kind of sandbox where you can play around with Ruby at your leisure. irb is launched by entering irb on the shell and ends if you enter exit.
An example is worth a thousand words:
$ irb --simple-prompt
>> puts 'Hello World!'
Hello World!
=> nil
>> exit
$

Note

I use irb --simple-prompt to generate shorter lines which make it easier to read this book on mobile devises.
In this chapter, we develop many examples within irb. You will also often try out new things within irb in the course of your work later, because it is so wonderfully quick and easy.

Comments in irb

Having comments within irb would obviously rarely make sense because code developed in irb is more or less code for the bin. But within this book, we occasionally use comments even in irb to make things clearer. You can copy these comments along with everything else and insert them into the irb without any problems, or you can simply omit them.

Updates about this book will be published on my Twitter feed.