Last Updated: February 25, 2016
· bugthing

Most recent return value in IRB

Do you use irb to quickly try things out?

If you are like me, you do and often fire up irb, try a little Ruby, and... "dam it!" you forgot to assign the return value to a varible!

You can just press up and alter the prev command, but that is anoying, especially if the prev command was over multiple lines.

No longer get anoyed and just use underscore (_) to get at the most recent return value

Say Thanks