Fix script_lines in loaded iseq as nil
This commit is contained in:
parent
f8bbd608c9
commit
9b751db99c
Notes:
git
2021-10-29 06:40:20 +09:00
@ -11835,7 +11835,8 @@ ibf_load_iseq_each(struct ibf_load *load, rb_iseq_t *iseq, ibf_offset_t offset)
|
|||||||
|
|
||||||
ISEQ_COVERAGE_SET(iseq, Qnil);
|
ISEQ_COVERAGE_SET(iseq, Qnil);
|
||||||
ISEQ_ORIGINAL_ISEQ_CLEAR(iseq);
|
ISEQ_ORIGINAL_ISEQ_CLEAR(iseq);
|
||||||
iseq->body->variable.flip_count = variable_flip_count;
|
load_body->variable.flip_count = variable_flip_count;
|
||||||
|
load_body->variable.script_lines = Qnil;
|
||||||
|
|
||||||
load_body->location.first_lineno = location_first_lineno;
|
load_body->location.first_lineno = location_first_lineno;
|
||||||
load_body->location.node_id = location_node_id;
|
load_body->location.node_id = location_node_id;
|
||||||
|
@ -464,6 +464,11 @@ class TestISeq < Test::Unit::TestCase
|
|||||||
a1 = iseq.to_a
|
a1 = iseq.to_a
|
||||||
a2 = iseq2.to_a
|
a2 = iseq2.to_a
|
||||||
assert_equal(a1, a2, message(mesg) {diff iseq.disassemble, iseq2.disassemble})
|
assert_equal(a1, a2, message(mesg) {diff iseq.disassemble, iseq2.disassemble})
|
||||||
|
if iseq2.script_lines
|
||||||
|
assert_kind_of(Array, iseq2.script_lines)
|
||||||
|
else
|
||||||
|
assert_nil(iseq2.script_lines)
|
||||||
|
end
|
||||||
iseq2
|
iseq2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user