summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/file.c b/file.c
index 064cc78259..a54c4ae964 100644
--- a/file.c
+++ b/file.c
@@ -2482,6 +2482,10 @@ rb_find_file(path)
if (file_load_ok(f)) return path;
}
+ if (rb_safe_level() >= 4) {
+ rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
+ }
+
if (rb_load_path) {
int i;