range.c: fixed a begin-less ranges issue.
MODIFY
src/range.c
src/range.c
@@ -409,7 +409,7 @@ mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp,
if (!mrb_range_p(range)) return MRB_RANGE_TYPE_MISMATCH;
r = mrb_range_ptr(mrb, range);
- beg = mrb_int(mrb, RANGE_BEG(r));
+ beg = mrb_nil_p(RANGE_BEG(r)) ? 0 : mrb_int(mrb, RANGE_BEG(r));
end = mrb_nil_p(RANGE_END(r)) ? -1 : mrb_int(mrb, RANGE_END(r));
excl = mrb_nil_p(RANGE_END(r)) ? 0 : RANGE_EXCL(r);

MODIFY
test/t/array.rb
test/t/array.rb
@@ -58,6 +58,7 @@ assert('Array#[]', '15.2.12.5.4') do
assert_equal(["b", "c"], a[1,2])
assert_equal(["b", "c", "d"], a[1..-2])
assert_equal(["b", "c", "d", "e"], a[1..])
+ assert_equal(["a", "b", "c"], a[..2])
skip unless Object.const_defined?(:Float)
assert_equal("b", a[1.1])
end

range.c: fixed a begin-less ranges issue.