irb: Interactive Ruby

If you installed Ruby, then you installed irb. To use it, just go to your command prompt, and type irb. When you’re in irb, you can type in any Ruby expression you want, and it will tell you the value of it. Type in 1+2, and it will tell you 3 (note that you don’t have to use puts). It’s kind of like a giant Ruby calculator. When you are done, type exit.

There’s a lot more to irb than this, but you can learn all about it in the PickAxe.

Get Learn to Program, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.