るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.229秒)
トップページ > ライブラリ:ビルトイン[x] > バージョン:2.6.0[x] > クエリ:_builtin[x] > クエリ:inspect[x] > クラス:Exception[x]

別のキーワード

  1. _builtin new
  2. _builtin []
  3. _builtin to_s
  4. _builtin each

検索結果

Exception#inspect -> String (78331.0)

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

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

//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}...