Need to add a write barrier for ranges; fix #4042

Ranges are almost immutable but `initialize` and `initialize_copy`
modify the receiver so that we need to add a write barrier.
parent a7f77fef
......@@ -120,6 +120,7 @@ range_init(mrb_state *mrb, mrb_value range, mrb_value beg, mrb_value end, mrb_bo
}
r->edges->beg = beg;
r->edges->end = end;
mrb_write_barrier(mrb, (struct RBasic*)r);
}
/*
* call-seq:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment