るりまサーチ

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

別のキーワード

  1. _builtin enable
  2. mkmf enable_config
  3. pop enable_ssl
  4. pop3 enable_ssl
  5. tracepoint enable

ライブラリ

クラス

モジュール

検索結果

<< < ... 3 4 5 >>

TracePoint#raised_exception -> Exception (7.0)

発生した例外を返します。

...eError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。

//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//}...

TracePoint#return_value -> object (7.0)

メソッドやブロックの戻り値を返します。

...timeError :return、:c_return、:b_return イベントのためのイベ
ントフックの外側で実行した場合に発生します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:return) do |tp|
p tp.return_value # => 1
end
trace.enable
foo 1
//}...
<< < ... 3 4 5 >>