412件ヒット
[1-100件を表示]
(0.203秒)
種類
- インスタンスメソッド (201)
- 特異メソッド (139)
- モジュール関数 (48)
- 定数 (12)
- クラス (12)
ライブラリ
- ビルトイン (412)
クラス
- TracePoint (213)
モジュール
- GC (36)
-
GC
:: Profiler (96) - Kernel (48)
-
RubyVM
:: MJIT (7)
キーワード
- OPTS (12)
- TracePoint (12)
- binding (12)
-
callee
_ id (12) - clear (12)
-
defined
_ class (12) - disable (48)
- enabled? (31)
-
eval
_ script (7) - event (12)
- inspect (12)
-
instruction
_ sequence (7) - lineno (12)
-
method
_ id (12) - new (12)
- parameters (7)
- path (12)
-
raised
_ exception (12) -
raw
_ data (12) - report (12)
- result (12)
-
return
_ value (12) - spawn (48)
-
total
_ time (12)
検索結果
先頭5件
-
TracePoint
# enable -> bool (26126.0) -
self のトレースを有効にします。
...racePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled? # =>......rue
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみトレースが有効になります。
この場合はブロックの評価結果を返します。
//emlist[例][ruby]{
trace.enabled? # =>......false
trace.enable do
trace.enabled? # => true
end
trace.enabled? # => false
//}
[注意] イベントフックのためのメソッドにブロックの外側で参照した場合は
RuntimeError が発生する事に注意してください。
//emlist[例][ruby]{
trace.enable { p trace.li... -
TracePoint
# enable { . . . } -> object (26126.0) -
self のトレースを有効にします。
...racePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled? # =>......rue
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみトレースが有効になります。
この場合はブロックの評価結果を返します。
//emlist[例][ruby]{
trace.enabled? # =>......false
trace.enable do
trace.enabled? # => true
end
trace.enabled? # => false
//}
[注意] イベントフックのためのメソッドにブロックの外側で参照した場合は
RuntimeError が発生する事に注意してください。
//emlist[例][ruby]{
trace.enable { p trace.li... -
GC
. enable -> bool (26113.0) -
ガーベージコレクトを許可します。
...ガーベージコレクトを許可します。
前回の禁止状態を返します(禁止されていたなら true, GC が有効であったなら、
false)。
@see GC.disable
//emlist[例][ruby]{
GC.disable # => false
GC.enable # => true
GC.enable # => false
//}... -
GC
:: Profiler . enable -> nil (26107.0) -
GC のプロファイラを起動します。
...GC のプロファイラを起動します。
このメソッドを呼び出してから GC が発生すると、
GC についてプロファイル情報を取得します。
例:
GC::Profiler.enable
GC::Profiler.enabled? #=> true
@see GC::Profiler.disable, GC::Profiler.enabled?... -
GC
:: Profiler . enabled? -> bool (14112.0) -
GC のプロファイラを起動中であれば true、停止中であれば false を返します。
...プロファイラを起動中であれば true、停止中であれば false を返します。
例:
GC::Profiler.enabled? #=> false
GC::Profiler.enable
GC::Profiler.enabled? #=> true
GC::Profiler.disable
GC::Profiler.enabled? #=> false
@see GC::Profiler.enable, GC::Profiler.disable... -
TracePoint
# enabled? -> bool (14106.0) -
self のトレースが有効な場合に true を、そうでない場合に false を返しま す。
...self のトレースが有効な場合に true を、そうでない場合に false を返しま
す。
@see TracePoint#enable, TracePoint#disable... -
RubyVM
:: MJIT . enabled? -> bool (14100.0) -
JIT が有効かどうかを返します。
JIT が有効かどうかを返します。
@see RubyVM::MJIT.pause, RubyVM::MJIT.resume -
TracePoint
. new(*events) {|obj| . . . } -> TracePoint (8022.0) -
新しい TracePoint オブジェクトを作成して返します。トレースを有効 にするには TracePoint#enable を実行してください。
...効
にするには TracePoint#enable を実行してください。
//emlist[例:irb で実行した場合][ruby]{
trace = TracePoint.new(:call) do |tp|
p [tp.lineno, tp.defined_class, tp.method_id, tp.event]
end
# => #<TracePoint:0x007f17372cdb20>
trace.enable
# => false
puts "Hello, TraceP... -
TracePoint
# defined _ class -> Class | module (8018.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]{
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 と TracePoint の上記の差分に注意して
ください。
@see 50864...