るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

TracePoint.trace(*events) {|obj| ... } -> TracePoint (9207.0)

新しい TracePoint オブジェクトを作成して自動的にトレースを開始し ます。TracePoint.new のコンビニエンスメソッドです。

...新しい TracePoint オブジェクトを作成して自動的にトレースを開始し
ます。TracePoint.new のコンビニエンスメソッドです。

@param events トレースするイベントを String か Symbol で任
意の数指定します。指定できる値に...
...ついては
TracePoint
.new を参照してください。

//emlist[例][ruby]{
t
race = TracePoint.trace(:call) { |tp| [tp.lineno, tp.event] }
# => #<TracePoint:0x007f786a452448>

t
race.enabled? # => true
//}

@raise ThreadError ブロックを指定しなかった場合に発生し...

TracePoint.new(*events) {|obj| ... } -> TracePoint (3107.0)

新しい TracePoint オブジェクトを作成して返します。トレースを有効 にするには TracePoint#enable を実行してください。

... TracePoint オブジェクトを作成して返します。トレースを有効
にするには TracePoint#enable を実行してください。

//emlist[例:irb で実行した場合][ruby]{
t
race = TracePoint.new(:call) do |tp|
p [tp.lineno, tp.defined_class, tp.method_id, tp.event]
end...
...=> #<TracePoint:0x007f17372cdb20>

t
race.enable
# => false

puts "Hello, TracePoint!"
# ...
# [69, IRB::Notifier::AbstractNotifier, :printf, :call]
# ...
//}

トレースを無効にするには TracePoint#disable を実行してください。

//emlist[][ruby]{
t
race.disable
//}

@param events...
...行した場合には RuntimeError が発生します。

//emlist[例][ruby]{
TracePoint
.trace(:line) do |tp|
$tp = tp
end
$tp.lineno # => access from outside (RuntimeError)
//}

他のスレッドから参照する事も禁じられています。

@raise ThreadError ブロックを指定しな...