summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/file.c b/file.c
index 19a99379ec..819224e856 100644
--- a/file.c
+++ b/file.c
@@ -1113,12 +1113,6 @@ eaccess(const char *path, int mode)
}
#endif
-static inline int
-access_internal(const char *path, int mode)
-{
- return access(path, mode);
-}
-
/*
* Document-class: FileTest
@@ -1350,7 +1344,7 @@ rb_file_readable_real_p(VALUE obj, VALUE fname)
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
- if (access_internal(StringValueCStr(fname), R_OK) < 0) return Qfalse;
+ if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
return Qtrue;
}
@@ -1422,7 +1416,7 @@ rb_file_writable_real_p(VALUE obj, VALUE fname)
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
- if (access_internal(StringValueCStr(fname), W_OK) < 0) return Qfalse;
+ if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
return Qtrue;
}
@@ -1486,7 +1480,7 @@ rb_file_executable_real_p(VALUE obj, VALUE fname)
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
- if (access_internal(StringValueCStr(fname), X_OK) < 0) return Qfalse;
+ if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
return Qtrue;
}