4件ヒット
[1-4件を表示]
(0.209秒)
クラス
-
IRB
:: Frame (1) - Thread (1)
- TracePoint (1)
- Tracer (1)
キーワード
-
defined
_ class (1) -
set
_ trace _ func (1)
検索結果
先頭4件
-
IRB
:: Frame # trace _ func(event , file , line , id , binding) -> Binding (63907.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (55207.0) -
@todo
@todo -
TracePoint
# defined _ class -> Class | module (45940.0) -
メソッドを定義したクラスかモジュールを返します。
メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trac... -
Thread
# set _ trace _ func(pr) -> Proc | nil (18997.0) -
スレッドにトレース用ハンドラを設定します。
スレッドにトレース用ハンドラを設定します。
nil を渡すとトレースを解除します。
設定したハンドラを返します。
//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]
#...