ActionsLike0
Bug #9455
closed
Blocks do not round-trip properly through ISeq dump/load
Description
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.
Updated by Anonymous about 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Updated by naruse (Yui NARUSE) about 11 years ago
- Backport changed from 1.9.3: DONTNEED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: DONTNEED, 2.0.0: REQUIRED, 2.1: DONE
Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago
- Backport changed from 1.9.3: DONTNEED, 2.0.0: REQUIRED, 2.1: DONE to 1.9.3: DONTNEED, 2.0.0: DONE, 2.1: DONE
Updated by wanabe (_ wanabe) over 10 years ago
- Has duplicate Bug #7995: RubyVM::InstructionSequence to_a not working for blocks added
ActionsLike0