summaryrefslogtreecommitdiffstats
path: root/enumerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/enumerator.c b/enumerator.c
index 7b2ef3491..0340338b5 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -856,8 +856,7 @@ enumerator_rewind(VALUE obj)
{
struct enumerator *e = enumerator_ptr(obj);
- if (rb_respond_to(e->obj, id_rewind))
- rb_funcall(e->obj, id_rewind, 0);
+ rb_check_funcall(e->obj, id_rewind, 0, 0);
e->fib = 0;
e->dst = Qnil;