るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.042秒)
トップページ > バージョン:2.3.0[x] > モジュール:Kernel[x] > クエリ:String[x] > クエリ:caller[x]

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

種類

ライブラリ

検索結果

Kernel.#caller(range) -> [String] | nil (54910.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 (54910.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 (54910.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$$@ -> [String] | nil (325.0)

最後に例外が発生した時のバックトレースを表す配列です。 Kernel.#raise によって設定されます。

...トレースを表す配列です。
Kernel
.#raise によって設定されます。

配列の各要素はメソッドの呼び出し位置を示す文字列で形式は

"filename:line"

または

"filename:line:in `methodname'"

です。これは Kernel.#caller が返す値と同じ形式...