summaryrefslogtreecommitdiff
path: root/ext/pathname
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/pathname
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/pathname')
-rw-r--r--ext/pathname/pathname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 84a2b5d61b..f890019cf9 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -9,7 +9,7 @@ get_strpath(VALUE obj)
{
VALUE strpath;
strpath = rb_ivar_get(obj, id_at_path);
- if (TYPE(strpath) != T_STRING)
+ if (!RB_TYPE_P(strpath, T_STRING))
rb_raise(rb_eTypeError, "unexpected @path");
return strpath;
}
@@ -28,7 +28,7 @@ static VALUE
path_initialize(VALUE self, VALUE arg)
{
VALUE str;
- if (TYPE(arg) == T_STRING) {
+ if (RB_TYPE_P(arg, T_STRING)) {
str = arg;
}
else {