summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index d16549178c5..c05abffe64a 100644
--- a/eval.c
+++ b/eval.c
@@ -7137,12 +7137,11 @@ rb_require_safe(fname, safe)
ruby_safe_level = safe;
found = search_required(fname, &feature, &path);
if (found) {
- if (!path || load_wait(RSTRING(path)->ptr)) {
+ if (!path || load_wait(RSTRING(feature)->ptr)) {
result = Qfalse;
}
else {
ruby_safe_level = 0;
- rb_provide_feature(feature);
switch (found) {
case 'r':
/* loading ruby library should be serialized. */
@@ -7165,6 +7164,7 @@ rb_require_safe(fname, safe)
rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
break;
}
+ rb_provide_feature(feature);
result = Qtrue;
}
}