22件ヒット
[1-22件を表示]
(0.015秒)
別のキーワード
ライブラリ
- ビルトイン (11)
-
rubygems
/ commands / which _ command (11)
キーワード
- Location (11)
- WhichCommand (11)
検索結果
-
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 自体のデバッグオプションを有...