2.3. 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
$

Buy the new Rails 5.1 version of this book.

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. 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.

Thank you for your support and the visibility by linking to this website on Twitter and Facebook. That helps a lot!