375件ヒット
[1-100件を表示]
(0.126秒)
別のキーワード
クラス
- Exception (33)
- Fiber (5)
- Matrix (22)
-
Net
:: HTTP (11) - Object (11)
-
OptionParser
:: ParseError (11) -
Rake
:: Application (11) - Thread (33)
-
Thread
:: Backtrace :: Location (33) - TracePoint (194)
-
WEBrick
:: HTTPResponse (11)
キーワード
-
absolute
_ path (11) -
add
_ trace _ func (11) - backtrace (11)
-
backtrace
_ locations (11) - binding (11)
-
callee
_ id (11) -
defined
_ class (11) - disable (22)
- enable (22)
- enabled? (11)
-
eval
_ script (6) - event (11)
- freeze (11)
- inspect (22)
-
instruction
_ sequence (6) - lineno (11)
-
method
_ id (11) - parameters (6)
- path (22)
- raise (16)
-
raised
_ exception (11) -
return
_ value (11) - self (11)
-
set
_ backtrace (22) -
set
_ error (11) -
set
_ trace _ func (11) - tr (11)
検索結果
先頭5件
-
Net
:: HTTP # trace(path , initheader = nil) -> Net :: HTTPResponse (21324.0) -
サーバの path に TRACE リクエストを ヘッダを initheader として送ります。
... path に TRACE リクエストを
ヘッダを initheader として送ります。
レスポンスを Net::HTTPResponse のオブジェクト
で返します。
@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「文字列=>......文字列」の
ハッシュで与えます。
@see Net::HTTP::Trace... -
Matrix
# trace -> Integer | Float | Rational | Complex (15336.0) -
トレース (trace) を返します。
...トレース (trace) を返します。
行列のトレース (trace) とは、対角要素の和です。
//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}
trace は正方行列でのみ定義されます。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が... -
TracePoint
# raised _ exception -> Exception (9319.0) -
発生した例外を返します。
...eError :raise イベントのためのイベントフックの外側で実行し
た場合に発生します。
//emlist[例][ruby]{
trace = TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace.enable
begin
0/0
rescue
end
//}... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (9307.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require......et_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_exception'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
TracePoint
# inspect -> String (9219.0) -
self の状態を人間に読みやすい文字列にして返します。
...self の状態を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.inspect # "#<TracePoint:call `foo'@/path/to/test.rb:1>"
end
trace.enable
foo 1
//}... -
TracePoint
# path -> String (9219.0) -
イベントが発生したファイルのパスを返します。
...トが発生したファイルのパスを返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.path # => "/path/to/test.rb"
end
trace.enable
foo 1
//}... -
Exception
# backtrace -> [String] (9207.0) -
バックトレース情報を返します。
...)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)
という形式の String の配列です。
//emlist[例][ruby]{
def methd
raise
end
begin
methd
rescue => e
p e.backtrace
end
#=> ["filename.rb:2:in `methd'", "filename.rb:6"]
//}
@see Exception#backtrace_locations... -
TracePoint
# eval _ script -> String | nil (9207.0) -
script_compiledイベント発生時にコンパイルされたソースコードを返します。 ファイルから読み込んだ場合は、nilを返します。
...script_compiledイベント発生時にコンパイルされたソースコードを返します。
ファイルから読み込んだ場合は、nilを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.eval_script # => "puts 'hello'"
end.enable do
eval("puts 'he......llo'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
TracePoint
# parameters -> [object] (9207.0) -
現在のフックが属するメソッドまたはブロックのパラメータ定義を返します。 フォーマットは Method#parameters と同じです。
...parameters と同じです。
@raise RuntimeError :call、:return、:b_call、:b_return、:c_call、:c_return
イベントのためのイベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(a, b = 2)
end
TracePoint.new(:call) do |tp......|
p tp.parameters # => a], [:opt, :b
end.enable do
foo(1)
end
//}
@see Method#parameters, UnboundMethod#parameters, Proc#parameters... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (9201.0) -
バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。
...す。
@param errinfo nil、String あるいは String の配列のいずれかを指定します。
//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.......set_backtrace(["dummy1", "dummy2"])
$!.backtrace # => ["dummy1", "dummy2"]
end
//}...