summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c
index 3d26b0b..e62eabf 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -1369,7 +1369,7 @@ static VALUE
lazy_flat_map_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE result = rb_yield_values2(argc - 1, &argv[1]);
- if (TYPE(result) == T_ARRAY) {
+ if (RB_TYPE_P(result, T_ARRAY)) {
long i;
for (i = 0; i < RARRAY_LEN(result); i++) {
rb_funcall(argv[0], id_yield, 1, RARRAY_PTR(result)[i]);