736件ヒット
[201-300件を表示]
(0.075秒)
ライブラリ
- ビルトイン (459)
-
irb
/ context (24) -
irb
/ ext / tracer (36) -
irb
/ frame (12) - matrix (24)
-
minitest
/ unit (1) -
net
/ http (12) - optparse (12)
- rake (12)
-
rubygems
/ config _ file (24) - tracer (108)
-
webrick
/ httpresponse (12)
クラス
- Exception (36)
- Fiber (6)
-
Gem
:: ConfigFile (24) -
IRB
:: Context (60) -
IRB
:: Frame (12) - Matrix (24)
-
Net
:: HTTP (12) - Object (12)
-
OptionParser
:: ParseError (12) -
Rake
:: Application (12) -
RubyVM
:: InstructionSequence (36) - Thread (72)
-
Thread
:: Backtrace :: Location (84) - TracePoint (213)
- Tracer (108)
-
WEBrick
:: HTTPResponse (12)
モジュール
キーワード
-
absolute
_ path (12) -
add
_ filter (12) -
add
_ trace _ func (12) -
back
_ trace _ limit (12) -
back
_ trace _ limit= (12) - backtrace (36)
- backtrace= (12)
-
backtrace
_ locations (36) -
base
_ label (12) - binding (12)
-
callee
_ id (12) -
defined
_ class (12) - disable (24)
- disasm (12)
- disassemble (12)
- enable (24)
- enabled? (12)
-
eval
_ script (7) - event (12)
- freeze (12)
-
get
_ line (12) -
get
_ thread _ no (12) - inspect (24)
-
instruction
_ sequence (7) - label (12)
- lineno (24)
-
method
_ id (12) - off (12)
- on (24)
- parameters (7)
- path (24)
- raise (18)
-
raised
_ exception (12) -
return
_ value (12) - self (12)
-
set
_ backtrace (24) -
set
_ error (12) -
set
_ get _ line _ procs (12) -
set
_ trace _ func (12) - skip (1)
- stdout (12)
-
to
_ a (12) -
to
_ s (12) - tr (12)
-
trace
_ func (24) -
use
_ tracer (12) -
use
_ tracer= (12) -
use
_ tracer? (12)
検索結果
先頭5件
-
IRB
:: Context # use _ tracer=(val) (6101.0) -
irb への入力を評価する時に tracer が有効にするかどうかを val で 指定します。
...する時に tracer が有効にするかどうかを val で
指定します。
.irbrc ファイル中で IRB.conf[:USE_TRACER] を設定する事でも同様の事が行
えます。
@param val tracer を有効にする場合に true を指定します。
@see tracer, IRB::Context#use_tracer... -
IRB
:: Context # use _ tracer? -> bool (6101.0) -
irb への入力を評価する時に tracer が有効かどうかを返します。
...irb への入力を評価する時に tracer が有効かどうかを返します。
@see tracer, IRB::Context#use_tracer=... -
OptionParser
:: ParseError # set _ backtrace(array) -> [String] (6101.0) -
自身に array で指定したバックトレースを設定します。
自身に array で指定したバックトレースを設定します。
@param array バックトレースを文字列の配列で指定します。
@return array を返します。 -
Thread
# backtrace -> [String] | nil (6101.0) -
スレッドの現在のバックトレースを返します。
...def m1
sleep 5
end
def m2
m1
end
end
th = Thread.new {C1.new.m2; Thread.stop}
th.backtrace
# => [
# [0] "(irb):3:in `sleep'",
# [1] "(irb):3:in `m1'",
# [2] "(irb):6:in `m2'",
# [3] "(irb):10:in `block in irb_binding'"
# ]
th.kill
th.backtrace # => nil
//}... -
TracePoint
# disable -> bool (3061.0) -
self のトレースを無効にします。
...行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable......[ruby]{
trace.enabled? # => true
trace.disable do
trace.enabled? # => false
end
trace.enabled? # => true
//}
[注意] イベントフックのためのメソッドに、ブロックの外側で参照した場合は
RuntimeError が発生する事に注意してください。
trace.enabl......e { p trace.lineno }
# => RuntimeError: access from outside
@see TracePoint#enable, TracePoint#enabled?... -
TracePoint
# disable { . . . } -> object (3061.0) -
self のトレースを無効にします。
...行前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable......[ruby]{
trace.enabled? # => true
trace.disable do
trace.enabled? # => false
end
trace.enabled? # => true
//}
[注意] イベントフックのためのメソッドに、ブロックの外側で参照した場合は
RuntimeError が発生する事に注意してください。
trace.enabl......e { p trace.lineno }
# => RuntimeError: access from outside
@see TracePoint#enable, TracePoint#enabled?... -
TracePoint
# enable -> bool (3061.0) -
self のトレースを有効にします。
...前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled......# => true
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみトレースが有効になります。
この場合はブロックの評価結果を返します。
//emlist[例][ruby]{
trace.enabled?......alse
trace.enable do
trace.enabled? # => true
end
trace.enabled? # => false
//}
[注意] イベントフックのためのメソッドにブロックの外側で参照した場合は
RuntimeError が発生する事に注意してください。
//emlist[例][ruby]{
trace.enable { p trace.lin... -
TracePoint
# enable { . . . } -> object (3061.0) -
self のトレースを有効にします。
...前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => false
trace.enable # => false (実行前の状態)
# トレースが有効
trace.enabled......# => true
trace.enable # => true (実行前の状態)
# 引き続きトレースが有効
//}
ブロックが与えられた場合、ブロック内でのみトレースが有効になります。
この場合はブロックの評価結果を返します。
//emlist[例][ruby]{
trace.enabled?......alse
trace.enable do
trace.enabled? # => true
end
trace.enabled? # => false
//}
[注意] イベントフックのためのメソッドにブロックの外側で参照した場合は
RuntimeError が発生する事に注意してください。
//emlist[例][ruby]{
trace.enable { p trace.lin... -
TracePoint
# defined _ class -> Class | module (3031.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 に......class C; include M; end;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_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 と TracePoint の上記の差分に注意して
ください。
@see 50864...