summaryrefslogtreecommitdiff
path: root/ext/pathname/pathname.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pathname/pathname.c')
-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 84a2b5d..f890019 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 {