673件ヒット
[1-100件を表示]
(0.169秒)
ライブラリ
- ビルトイン (419)
-
irb
/ context (22) -
irb
/ ext / tracer (33) -
irb
/ frame (11) - matrix (22)
-
minitest
/ unit (1) -
net
/ http (11) - optparse (11)
- rake (11)
-
rubygems
/ config _ file (22) - tracer (99)
-
webrick
/ httpresponse (11)
クラス
- Exception (33)
- Fiber (5)
-
Gem
:: ConfigFile (22) -
IRB
:: Context (55) -
IRB
:: Frame (11) - Matrix (22)
-
Net
:: HTTP (11) - Object (11)
-
OptionParser
:: ParseError (11) -
Rake
:: Application (11) -
RubyVM
:: InstructionSequence (33) - Thread (66)
-
Thread
:: Backtrace :: Location (77) - TracePoint (194)
- Tracer (99)
-
WEBrick
:: HTTPResponse (11)
モジュール
キーワード
-
absolute
_ path (11) -
add
_ filter (11) -
add
_ trace _ func (11) -
back
_ trace _ limit (11) -
back
_ trace _ limit= (11) - backtrace (33)
- backtrace= (11)
-
backtrace
_ locations (33) -
base
_ label (11) - binding (11)
-
callee
_ id (11) -
defined
_ class (11) - disable (22)
- disasm (11)
- disassemble (11)
- enable (22)
- enabled? (11)
-
eval
_ script (6) - event (11)
- freeze (11)
-
get
_ line (11) -
get
_ thread _ no (11) - inspect (22)
-
instruction
_ sequence (6) - label (11)
- lineno (22)
-
method
_ id (11) - off (11)
- on (22)
- parameters (6)
- path (22)
- raise (16)
-
raised
_ exception (11) -
return
_ value (11) - self (11)
-
set
_ backtrace (22) -
set
_ error (11) -
set
_ get _ line _ procs (11) -
set
_ trace _ func (11) - skip (1)
- stdout (11)
-
to
_ a (11) -
to
_ s (11) - tr (11)
-
trace
_ func (22) -
use
_ tracer (11) -
use
_ tracer= (11) -
use
_ tracer? (11)
検索結果
先頭5件
-
Matrix
# trace -> Integer | Float | Rational | Complex (24236.0) -
トレース (trace) を返します。
...トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が... -
Net
:: HTTP # trace(path , initheader = nil) -> Net :: HTTPResponse (24224.0) -
サーバの path に TRACE リクエストを ヘッダを initheader として送ります。
...サーバの path に TRACE リクエストを
ヘッダを initheader として送ります。
レスポンスを Net::HTTPResponse のオブジェクト
で返します。
@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「......文字列=>文字列」の
ハッシュで与えます。
@see Net::HTTP::Trace... -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (18202.0) -
@todo
...@todo... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (15401.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...ption#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Dat......month, -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_ex......ception'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
Gem
:: ConfigFile # backtrace=(backtrace) (12401.0) -
エラー発生時にバックトレースを出力するかどうか設定します。
...エラー発生時にバックトレースを出力するかどうか設定します。
@param backtrace 真を指定するとエラー発生時にバックトレースを出力するようになります。... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12401.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...トレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフ......cations と似ていますが、本メソッドは 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 取得するフ......cations と似ていますが、本メソッドは 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... -
Exception
# backtrace -> [String] (12301.0) -
バックトレース情報を返します。
...line}:in `#{method}'"
(メソッド内の場合)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)
という形式の String の配列です。
//emlist[例][ruby]{
def methd
raise
end
begin
methd
rescue => e
p e.backtrace
end
#=> ["filename.rb:2:in `methd'", "filenam......e.rb:6"]
//}
@see Exception#backtrace_locations... -
Thread
# backtrace -> [String] | nil (12301.0) -
スレッドの現在のバックトレースを返します。
...ist[例][ruby]{
class C1
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
//}... -
Thread
# set _ trace _ func(pr) -> Proc | nil (12238.0) -
スレッドにトレース用ハンドラを設定します。
...。
//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]
# => ["c-call", "example.rb", 2, :inherited, #<Binding:......0x00007fc8de886770>, Class]
# => ["c-return", "example.rb", 2, :inherited, #<Binding:0x00007fc8de8844e8>, Class]
# => ["class", "example.rb", 2, nil, #<Binding:0x00007fc8de88e830>, nil]
# => ["end", "example.rb", 3, nil, #<Binding:0x00007fc8de88d6b0>, nil]
# => ["line", "example.rb", 4, nil, #<Bindi......, :to_s, #<Binding:0x00007fc8de896f30>, Integer]
# => ["c-return", "example.rb", 4, :to_s, #<Binding:0x00007fc8de894a50>, Integer]
# => ["line", "example.rb", 5, nil, #<Binding:0x00007fc8de967b08>, nil]
# => ["c-call", "example.rb", 5, :current, #<Binding:0x00007fc8de967798>, Thread]
# => ["c-return...