convert range edges to integers

parent bd681269
......@@ -242,8 +242,8 @@ mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp,
if (mrb_type(range) != MRB_TT_RANGE) return FALSE;
beg = b = mrb_fixnum(r->edges->beg);
end = e = mrb_fixnum(r->edges->end);
beg = b = mrb_fixnum(mrb_to_int(mrb, r->edges->beg));
end = e = mrb_fixnum(mrb_to_int(mrb, r->edges->end));
if (beg < 0) {
beg += len;
......
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