summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/enum.c b/enum.c
index b139b69dbb..f05c556844 100644
--- a/enum.c
+++ b/enum.c
@@ -663,6 +663,7 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
}
memo = NEW_MEMO(init, Qnil, op);
rb_block_call(obj, id_each, 0, 0, iter, (VALUE)memo);
+ if (memo->u1.value == Qundef) return Qnil;
return memo->u1.value;
}