Flowdock
method

absolute_path

Importance_1
v2_4_6 - Show latest stable - 0 notes - Class: InstructionSequence
absolute_path() public

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
Show source
Register or log in to add new notes.