るりまサーチ

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

別のキーワード

  1. _builtin b
  2. string b
  3. b _builtin
  4. b string
  5. b

ライブラリ

クラス

検索結果

IRB::Frame#bottom(n = 0) -> Binding (24202.0)

下から n 番目のコンテキストを取り出します。

下から n 番目のコンテキストを取り出します。

@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
下位になります。

Exception#full_message(highlight: true, order: :bottom) -> String (220.0)

例外の整形された文字列を返します。

...例外の整形された文字列を返します。

返される文字列は Ruby が捕捉されなかった例外を標準エラー出力に出力するときと
同じ形式です。
そのため、メソッド呼び出し時に $stderr が変更されておらず、$stderr.tty? が真の場合...
...:bottom で指定する必要があります。
バックトレースの一番奥がエラーメッセージの上(top)か下(bottom)かを指定します。
デフォルト値は Exception.to_tty? が真なら :bottom で偽なら :top です。

//emlist[例][ruby]{
b
egi...
...ceback \e[m(most recent call last):\ntest.rb:2:in `<main>': \e[1mtest (\e[4;1mRuntimeError\e[m\e[1m)\n\e[m"
$stderr = $stdout
p e.full_message # => "test.rb:2:in `<main>': test (RuntimeError)\n"
$stderr = STDERR
p e.full_message # => "\e[1mTraceback \e[m(most recent call last):\ntest.rb:...