498件ヒット
[1-100件を表示]
(0.159秒)
ライブラリ
- ビルトイン (310)
-
irb
/ context (22) -
irb
/ ext / tracer (33) -
irb
/ frame (11) - matrix (22)
-
minitest
/ unit (1) -
net
/ http (11) - rake (11)
-
rubygems
/ config _ file (22) - tracer (44)
-
webrick
/ httpresponse (11)
クラス
- Exception (22)
- Fiber (5)
-
Gem
:: ConfigFile (22) -
IRB
:: Context (55) -
IRB
:: Frame (11) - Matrix (22)
-
Net
:: HTTP (11) - Object (11)
-
Rake
:: Application (11) -
RubyVM
:: InstructionSequence (11) - Thread (44)
-
Thread
:: Backtrace :: Location (77) - TracePoint (140)
- Tracer (44)
-
WEBrick
:: HTTPResponse (11)
モジュール
キーワード
-
absolute
_ path (11) -
add
_ filter (11) -
back
_ trace _ limit (11) -
back
_ trace _ limit= (11) - backtrace (22)
- backtrace= (11)
-
backtrace
_ locations (33) -
base
_ label (11) - binding (2)
-
callee
_ id (11) -
defined
_ class (11) - disable (22)
- disassemble (11)
- enable (22)
- enabled? (11)
-
eval
_ script (6) - event (11)
- freeze (11)
-
get
_ line (11) - inspect (11)
- label (11)
- lineno (22)
-
method
_ id (11) - path (11)
- raise (5)
-
return
_ value (11) - self (11)
-
set
_ backtrace (11) -
set
_ error (11) -
set
_ get _ line _ procs (11) -
set
_ trace _ func (11) - skip (1)
-
to
_ s (11) - tr (11)
-
trace
_ func (22) -
use
_ tracer (11) -
use
_ tracer= (11) -
use
_ tracer? (11)
検索結果
先頭5件
- Net
:: HTTP # trace(path , initheader = nil) -> Net :: HTTPResponse - Matrix
# trace -> Integer | Float | Rational | Complex - Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] - Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil
-
Net
:: HTTP # trace(path , initheader = nil) -> Net :: HTTPResponse (18224.0) -
サーバの path に TRACE リクエストを ヘッダを initheader として送ります。
...サーバの path に TRACE リクエストを
ヘッダを initheader として送ります。
レスポンスを Net::HTTPResponse のオブジェクト
で返します。
@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「......文字列=>文字列」の
ハッシュで与えます。
@see Net::HTTP::Trace... -
Matrix
# trace -> Integer | Float | Rational | Complex (15236.0) -
トレース (trace) を返します。
...トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (12401.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...す。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
ret......th, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_excep......tion'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12401.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...レースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレ......ます。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
/....../}
@see Thread::Backtrace::Location... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (12401.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...レースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレ......ます。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
/....../}
@see Thread::Backtrace::Location... -
IRB
:: Context # back _ trace _ limit=(val) (12214.0) -
エラー発生時のバックトレース表示の先頭、末尾の上限の行数をそれぞれ val 行に設定します。
...ぞれ val
行に設定します。
.irbrc ファイル中で IRB.conf[:BACK_TRACE_LIMIT] を設定する事でも同様の
操作が行えます。
@param val バックトレース表示の先頭、末尾の上限を Integer で指定
します。
@see IRB::Context#back_trace_limit... -
IRB
:: Context # back _ trace _ limit -> Integer (12208.0) -
エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。
...エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。
デフォルト値は 16 です。
@see IRB::Context#back_trace_limit=... -
TracePoint
# defined _ class -> Class | module (9231.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......ef foo; end; end
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 の上記の差分に注意して
ください。... -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (9202.0) -
@todo
@todo -
Gem
:: ConfigFile # backtrace -> bool (9201.0) -
エラー発生時にバックトレースを出力するかどうかを返します。
エラー発生時にバックトレースを出力するかどうかを返します。
真の場合はバックトレースを出力します。そうでない場合はバックトレースを出力しません。