From b0dd250dc95ea0fae89c3201967039d582fbf156 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 23 May 2012 07:13:21 +0000 Subject: 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 --- ext/objspace/objspace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/objspace') 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"); } -- cgit v1.2.3