Hi Inside rails console you can get the result of the previous operation with _
Is there any way to do such a thing inside ruby program?
views:
37answers:
1
+1
A:
everything in Ruby is an object, so think about it, if any returned object is not assigned a reference then it will be marked for garbage collection, so no there is no way other than to assign a returned object to a variable!
Rajinder Yadav
2010-10-15 20:51:43