inspect -> String[permalink][rdoc]-
self のクラス名と message を文字列にして返します。
例begin raise "exception" rescue p $!.inspect # => "#<RuntimeError: exception>" end
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
inspect -> String[permalink][rdoc]self のクラス名と message を文字列にして返します。
例
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end