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