diff options
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/enumerator.c b/enumerator.c index 022690a2a3..3aa0d2ea78 100644 --- a/enumerator.c +++ b/enumerator.c @@ -494,6 +494,8 @@ enumerator_with_index(int argc, VALUE *argv, VALUE obj) RETURN_SIZED_ENUMERATOR(obj, argc, argv, enumerator_size); if (NIL_P(memo)) memo = INT2FIX(0); + else + memo = rb_to_int(memo); return enumerator_block_call(obj, enumerator_with_index_i, (VALUE)&memo); } |