22件ヒット
[1-22件を表示]
(0.290秒)
クラス
検索結果
先頭2件
-
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (26217.0) -
self が表す命令シーケンスの絶対パスを返します。
...>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb... -
Thread
:: Backtrace :: Location # absolute _ path -> String (26122.0) -
self が表すフレームの絶対パスを返します。
...][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|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path...