summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 768b7e8..e18fb3d 100644
--- a/array.c
+++ b/array.c
@@ -400,7 +400,7 @@ rb_ary_subseq(ary, beg, len)
{
VALUE ary2;
- if (beg > RARRAY(ary)->len) return Qnil;
+ if (beg >= RARRAY(ary)->len) return Qnil;
if (beg < 0 || len < 0) return Qnil;
if (beg + len > RARRAY(ary)->len) {