Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

RubyVM::InstructionSequence#script_lines

() -> ::Array[::String]?
iseq.script_lines → array or nil

It returns recorded script lines if it is available. The script lines are not limited to the iseq range, but are entire lines of the source file.

Note that this is an API for ruby internal use, debugging, and research. Do not use this for any other purpose. The compatibility is not guaranteed.

See also #path #to_a #label #to_binary also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1