mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user