るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.085秒)
トップページ > 種類:クラス[x] > クエリ:TracePoint[x]

別のキーワード

  1. tracepoint enable
  2. tracepoint disable
  3. _builtin tracepoint
  4. tracepoint new
  5. tracepoint self

ライブラリ

検索結果

TracePoint (38049.0)

Kernel.#set_trace_func と同様の機能をオブジェクト指向的な API で 提供するクラスです。

...集する][ruby]{
trace = TracePoint.new(:raise) do |tp|
p [tp.lineno, tp.event, tp.raised_exception]
end
# => #<TracePoint:0x007f786a452448>

trace.enable
# => false

0 / 0
# => [5, :raise, #<ZeroDivisionError: divided by 0>]
//}

TracePoint
.new または、TracePoint.trace で指定したブロ...
...トの詳細については、TracePoint.new を参照してくださ
い。

=== 参考

* Ruby VM アドベントカレンダー #12 TracePoint の紹介 (1): https://www.atdot.net/~ko1/diary/201212.html#d12
* Ruby VM アドベントカレンダー #13 TracePoint の紹介 (2): https://www.atdot...
....net/~ko1/diary/201212.html#d13
* Ruby VM アドベントカレンダー #14 TracePoint の紹介 (3): https://www.atdot.net/~ko1/diary/201212.html#d14...