Method: RubyVM::InstructionSequence#absolute_path
- Defined in:
- iseq.c
#absolute_path ⇒ Object
Returns the absolute path of this instruction sequence.
nil if the iseq was evaluated from a string.
For example, using ::compile_file:
# /tmp/method.rb def hello
puts "hello, world"
end
# in irb > iseq = RubyVM::InstructionSequence.compile_file(‘/tmp/method.rb’) > iseq.absolute_path #=> /tmp/method.rb
2007 2008 2009 2010 2011 |
# File 'iseq.c', line 2007
static VALUE
iseqw_absolute_path(VALUE self)
{
return rb_iseq_realpath(iseqw_check(self));
}
|