summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-23 07:13:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-23 07:13:21 +0000
commitb0dd250dc95ea0fae89c3201967039d582fbf156 (patch)
treefb9483ca974a305e496eb87e960dcfecf7b9115f /ext/socket/ancdata.c
parent87c8c5edf43a7f7d33d5fe75f51ef410a03b93b1 (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 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index f8379cc..52f92a1 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -196,7 +196,7 @@ ancillary_s_unix_rights(int argc, VALUE *argv, VALUE klass)
for (i = 0 ; i < argc; i++) {
VALUE obj = argv[i];
- if (TYPE(obj) != T_FILE) {
+ if (!RB_TYPE_P(obj, T_FILE)) {
rb_raise(rb_eTypeError, "IO expected");
}
rb_ary_push(ary, obj);
@@ -1496,7 +1496,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
rb_secure(4);
vopts = Qnil;
- if (0 < argc && TYPE(argv[argc-1]) == T_HASH)
+ if (0 < argc && RB_TYPE_P(argv[argc-1], T_HASH))
vopts = argv[--argc];
rb_scan_args(argc, argv, "03", &vmaxdatlen, &vflags, &vmaxctllen);