るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.071秒)

別のキーワード

  1. _builtin runtimeerror
  2. raise runtimeerror
  3. fail runtimeerror
  4. open runtimeerror
  5. enable runtimeerror

ライブラリ

クラス

検索結果

Exception#inspect -> String (54343.0)

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

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

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

Object#pretty_print_inspect -> String (18391.0)

Object#pretty_print を使って Object#inspect と同様に オブジェクトを人間が読める形式に変換した文字列を返します。

Object#pretty_print を使って Object#inspect と同様に
オブジェクトを人間が読める形式に変換した文字列を返します。

出力する全てのオブジェクトに Object#pretty_print が定義されている必要があります。
そうでない場合には RuntimeError が発生します。

@raise RuntimeError 出力する全てのオブジェクトに Object#pretty_print が定義されて
いない場合に発生します。