55件ヒット
[1-55件を表示]
(0.103秒)
クラス
-
IRB
:: Frame (11) - Thread (22)
- TracePoint (11)
- Tracer (11)
キーワード
-
add
_ trace _ func (11) -
defined
_ class (11) -
set
_ trace _ func (11)
検索結果
先頭5件
-
IRB
:: Frame # trace _ func(event , file , line , id , binding) -> Binding (18102.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (18102.0) -
@todo
@todo -
Thread
# set _ trace _ func(pr) -> Proc | nil (6132.0) -
スレッドにトレース用ハンドラを設定します。
...したハンドラを返します。
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
2.to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]
# => ["c-call", "examp......"c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>, Thread]
//}
@param pr トレースハンドラ(Proc オブジェクト) もしくは nil
@see Thread#add_trace_func Kernel.#set_trace_func... -
Thread
# add _ trace _ func(pr) -> Proc (6120.0) -
スレッドにトレース用ハンドラを追加します。
...@param pr トレースハンドラ(Proc オブジェクト)
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
43.to_s
end
th.add_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 4, nil, #<Binding:0x00007f98e107d0d8>, nil]
# => ["c-call", "example.rb", 4, :inherit......e0>, nil]
# => ["line", "example.rb", 6, nil, #<Binding:0x00007f98e108d4b0>, nil]
# => ["c-call", "example.rb", 6, :to_s, #<Binding:0x00007f98e1097aa0>, Integer]
# => ["c-return", "example.rb", 6, :to_s, #<Binding:0x00007f98e1095cc8>, Integer]
//}
@see Thread#set_trace_func Kernel.#set_trace_func... -
TracePoint
# defined _ class -> Class | module (13.0) -
メソッドを定義したクラスかモジュールを返します。
...trace_func の 6 番目のブロックパ
ラメータは特異クラスではなく元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func...