summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/variable.c b/variable.c
index 34a978f253..610dae2261 100644
--- a/variable.c
+++ b/variable.c
@@ -1329,7 +1329,7 @@ autoload_delete(mod, id)
return (NODE *)load;
}
-void
+VALUE
rb_autoload_load(klass, id)
VALUE klass;
ID id;
@@ -1338,9 +1338,9 @@ rb_autoload_load(klass, id)
NODE *load = autoload_delete(klass, id);
if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
- const_missing(klass, id);
+ return Qfalse;
}
- rb_require_safe(file, load->nd_nth);
+ return rb_require_safe(file, load->nd_nth);
}
static VALUE
@@ -1406,7 +1406,7 @@ rb_const_get_0(klass, id, exclude, recurse)
while (tmp) {
while (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
if (value == Qundef) {
- rb_autoload_load(tmp, id);
+ if (!RTEST(rb_autoload_load(tmp, id))) break;
continue;
}
if (exclude && tmp == rb_cObject && klass != rb_cObject) {