Underscore in irb/rails console

In IRB/Rais console, we can use _ (underscore) to retrieve the last output.

'This is a string'
_.class
#=> String