[ruby-core:124700] [Ruby Bug#21866] Backport Fix for integer overflow checks in enumerator