In the containment test, get the boundary condition right. ">" was used
where ">=" should have been.
This closes bug #121965.
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 5c794fc..0deabe9 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -193,9 +193,9 @@
if (num < 0 && PyErr_Occurred())
return -1;
- if (num < r->start || (num - r->start) % r->step)
+ if ((num < r->start) || ((num - r->start) % r->step))
return 0;
- if (num > (r->start + (r->len * r->step)))
+ if (num >= (r->start + (r->len * r->step)))
return 0;
return 1;
}