るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. profile profiler__
  2. profile profile_proc
  3. profile stop_profile
  4. profile start_profile
  5. profile print_profile

ライブラリ

検索結果

Kernel.#set_trace_func(proc) -> Proc (25.0)

Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。

...uby]{
set_trace_func lambda {|*arg|
p arg
}
class Foo
end
43.to_s

# ----結果----
# ["c-return", "..", 1, :set_trace_func, #<Binding:0xf6ceb8>, Kernel]
# ["line", "..", 4, nil, #<Binding:0x10cbcd8>, nil]
# ["c-call", "..", 4, :inherited, #<Binding:0x10cba98>, Class]
# ["c-return", "..", 4, :inhe...
...["class", "..", 4, nil, #<Binding:0x10cb600>, nil]
# ["end", "..", 5, nil, #<Binding:0x10cb3f0>, nil]
# ["line", "..", 6, nil, #<Binding:0x10cb1e0>, nil]
# ["c-call", "..", 6, :to_s, #<Binding:0x10cafd0>, Fixnum]
# ["c-return", "..", 6, :to_s, #<Binding:0x10cad78>, Fixnum]
//}

@see Kernel.#caller...