diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-23 07:13:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-23 07:13:21 +0000 |
commit | b0dd250dc95ea0fae89c3201967039d582fbf156 (patch) | |
tree | fb9483ca974a305e496eb87e960dcfecf7b9115f /enumerator.c | |
parent | 87c8c5edf43a7f7d33d5fe75f51ef410a03b93b1 (diff) |
use RB_TYPE_P() instead of comparison of TYPE()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c index 3d26b0bc76..e62eabf61f 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]); |