irb(main):001:0> 1+2
=> 3
irb(main):002:0> a=_
=> 3
irb(main):003:0> a
=> 3
Underscore assigns the last executed statement's return value to a.
Notes to self
Showing posts with label ruby. Show all posts
Showing posts with label ruby. Show all posts
Wednesday, September 9, 2009
Subscribe to:
Comments (Atom)