What is the global variable for the last expression

Ruby Version - 1.9.2

In IRB, the last expression is in _. But if you are in a ruby ​​program how to get the last expression.

thanks

+4
source share
1 answer

You do not do this; save it in a variable.

List of 1.9 special variables

+6
source

All Articles