5件ヒット
[1-5件を表示]
(0.019秒)
検索結果
先頭5件
-
Kernel
. # caller(range) -> [String] | nil (54619.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de... -
Kernel
. # caller(start = 1) -> [String] | nil (54619.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de... -
Kernel
. # caller(start , length) -> [String] | nil (54619.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de... -
Kernel
. # set _ trace _ func(proc) -> Proc (18361.0) -
Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。
...uby]{
set_trace_func lambda {|*arg|
p arg
}
class Foo
end
43.to_s
# ----結果----
# ["c-return", "..", 1, :set_trace_func, #<Binding:0xf6ceb8>, Kernel]
# ["line", "..", 4, nil, #<Binding:0x10cbcd8>, nil]
# ["c-call", "..", 4, :inherited, #<Binding:0x10cba98>, Class]
# ["c-return", "..", 4, :inhe......["class", "..", 4, nil, #<Binding:0x10cb600>, nil]
# ["end", "..", 5, nil, #<Binding:0x10cb3f0>, nil]
# ["line", "..", 6, nil, #<Binding:0x10cb1e0>, nil]
# ["c-call", "..", 6, :to_s, #<Binding:0x10cafd0>, Fixnum]
# ["c-return", "..", 6, :to_s, #<Binding:0x10cad78>, Fixnum]
//}
@see Kernel.#caller... -
Kernel
$ $ @ -> [String] | nil (40.0) -
最後に例外が発生した時のバックトレースを表す配列です。 Kernel.#raise によって設定されます。
...トレースを表す配列です。
Kernel.#raise によって設定されます。
配列の各要素はメソッドの呼び出し位置を示す文字列で形式は
"filename:line"
または
"filename:line:in `methodname'"
です。これは Kernel.#caller が返す値と同じ形式...