It happens that when we are working on the console we need to make use of last return value. It is also annoying when we forget to assign it to a variable to make use of it and have to type/copy it all over again.
When this happens, we can conveniently use underscore _
to retrieve the last return value.
$ irb
['I am last returned array']
_
['I am last returned array']
Top comments (0)