summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/file.c b/file.c
index 41f2c10550..d41c2f48ae 100644
--- a/file.c
+++ b/file.c
@@ -3954,15 +3954,9 @@ is_macos_native_path(const char *path)
#endif
static int
-file_load_ok(const char *file)
+file_load_ok(const char *path)
{
- FILE *f;
-
- if (!file) return 0;
- f = fopen(file, "r");
- if (f == NULL) return 0;
- fclose(f);
- return 1;
+ return eaccess(path, R_OK);
}
extern VALUE rb_load_path;