Ruby 2.6.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > RubyVM::InstructionSequenceクラス > load_from_binary_extra_data

singleton method RubyVM::InstructionSequence.load_from_binary_extra_data

load_from_binary_extra_data(binary) -> String[permalink][rdoc]

バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。



iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data

[SEE_ALSO] RubyVM::InstructionSequence#to_binary