るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.015秒)
トップページ > クエリ:backtrace[x] > 種類:クラス[x]

別のキーワード

  1. _builtin backtrace_locations
  2. _builtin backtrace
  3. thread backtrace_locations
  4. thread backtrace
  5. exception backtrace

キーワード

検索結果

Thread::Backtrace::Location (3007.0)

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

...例1の実行結果:

caller_locations.rb:2:in `a'
caller_locations.rb:5:in `b'
caller_locations.rb:8:in `c'

//emlist[例2][ruby]{
# foo.rb
class
Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
p...
...uts call.to_s
end
//}

例2の実行結果:

init.rb:4:in `initialize'
init.rb:8:in `new'
init.rb:8:in `<main>'

=== 参考

* Ruby VM アドベントカレンダー #4 vm_backtrace.c: https://www.atdot.net/~ko1/diary/201212.html#d4...

Gem::Commands::WhichCommand (7.0)

指定された Gem パッケージに含まれるライブラリのパスを見つけるためのクラスです。

...静かに実行します
--config-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有...