In Python, you can use the _
field to grab the last computed value. That's really useful in IDLE. Does Ruby have an equivalent for IRB?
An example from Python:
>>> 2 + 2
4
>>> _
4
>>> "Me " + "You"
'Me You'
>>> _
'Me You'
In Python, you can use the _
field to grab the last computed value. That's really useful in IDLE. Does Ruby have an equivalent for IRB?
An example from Python:
>>> 2 + 2
4
>>> _
4
>>> "Me " + "You"
'Me You'
>>> _
'Me You'