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 /ext/objspace/objspace.c | |
parent | 87c8c5edf43a7f7d33d5fe75f51ef410a03b93b1 (diff) | |
download | ruby-b0dd250dc95ea0fae89c3201967039d582fbf156.tar.gz |
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 'ext/objspace/objspace.c')
-rw-r--r-- | ext/objspace/objspace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index f37499fc27..337dcb87e2 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -300,7 +300,7 @@ count_objects_size(int argc, VALUE *argv, VALUE os) VALUE hash; if (rb_scan_args(argc, argv, "01", &hash) == 1) { - if (TYPE(hash) != T_HASH) + if (!RB_TYPE_P(hash, T_HASH)) rb_raise(rb_eTypeError, "non-hash given"); } @@ -404,7 +404,7 @@ count_nodes(int argc, VALUE *argv, VALUE os) VALUE hash; if (rb_scan_args(argc, argv, "01", &hash) == 1) { - if (TYPE(hash) != T_HASH) + if (!RB_TYPE_P(hash, T_HASH)) rb_raise(rb_eTypeError, "non-hash given"); } @@ -609,7 +609,7 @@ count_tdata_objects(int argc, VALUE *argv, VALUE self) VALUE hash; if (rb_scan_args(argc, argv, "01", &hash) == 1) { - if (TYPE(hash) != T_HASH) + if (!RB_TYPE_P(hash, T_HASH)) rb_raise(rb_eTypeError, "non-hash given"); } |