るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.040秒)
トップページ > ライブラリ:ビルトイン[x] > バージョン:2.3.0[x] > クエリ:*[x] > クエリ:Location[x]

別のキーワード

  1. _builtin *
  2. matrix *
  3. vector *
  4. array *
  5. bigdecimal *

検索結果

Thread::Backtrace::Location (54025.0)

Ruby のフレームを表すクラスです。

Ruby のフレームを表すクラスです。

Kernel.#caller_locations から生成されます。

//emlist[例1][ruby]{
# caller_locations.rb
def a(skip)
caller_locations(skip)
end
def b(skip)
a(skip)
end
def c(skip)
b(skip)
end

c(0..2).map do |call|
puts call.to_s
end
//}

例1の実行結果:

caller_locations.rb:2:in `a'
caller_locations...