るりまサーチ

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

別のキーワード

  1. optionparser on
  2. optparse on
  3. tracer on
  4. thread abort_on_exception
  5. thread abort_on_exception=

ライブラリ

キーワード

検索結果

TracePoint#instruction_sequence -> RubyVM::InstructionSequence (6201.0)

script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。

...ledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。

//emlist[例][ruby]{
TracePoint
.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("puts 'hello...

TracePoint#raised_exception -> Exception (6201.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
//}...