diff options
Diffstat (limited to 'ext/objspace')
-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"); } |