Blocks do not round-trip properly through ISeq dump/load
Blocks passed to methods do not round-trip properly when dumped with RubyVM::InstructionSequence#to_a and then loaded again with rb_iseq_load.
This is because iseq_data_to_ary in iseq.c stores serialized blocks under the :blockptr key (https://github.com/ruby/ruby/blob/trunk/iseq.c#L1813), but expects them to be stored in the :block key when loading them back up (https://github.com/ruby/ruby/blob/trunk/compile.c#L5811).
This affects trunk, 2.1.0 and 2.0.0.
compile.c: use correct key for block when loading serialized iseqs
- compile.c (iseq_build_from_ary_body): Use :blockptr instead of :block as hash key when loading serialized instruction sequences from arrays. [Bug #9455]
#1 [ruby-core:60147] Updated by Charlie Somerville about 2 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100