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
Written by Ben
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#