Skip to content
instance method

RubyVM::InstructionSequence#to_binary

() -> ::String
iseq.to_binary(extra_data = nil) → binary str

Returns serialized iseq binary format data as a String object. A corresponding iseq object is created by RubyVM::InstructionSequence.load_from_binary() method.

String extra_data will be saved with binary data. You can access this data with RubyVM::InstructionSequence.load_from_binary_extra_data(binary).

Note that the translated binary data is not portable. You can not move this binary data to another machine. You can not use the binary data which is created by another version/another architecture of Ruby.

See also #to_a #trace_points #script_lines also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0