このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 2.1.0 リファレンスマニュアル

instance method Exception#inspect

inspect -> String[permalink][rdoc]

self のクラス名と message を文字列にして返します。

例:

begin
  raise "exception"
rescue
  p $!.inspect # => "#<RuntimeError: exception>"
end