summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 00006aeff5..32d0155b15 100644
--- a/eval.c
+++ b/eval.c
@@ -3303,6 +3303,7 @@ static VALUE
rb_f_loop()
{
for (;;) { rb_yield_0(Qnil, 0, 0, Qfalse); }
+ return Qnil; /* dummy */
}
static VALUE
@@ -4861,6 +4862,7 @@ rb_f_require(obj, fname)
ext = strrchr(buf, '.');
strcpy(ext, DLEXT);
file = feature = buf;
+ if (rb_provided(feature)) return Qfalse;
}
file = find_file(file);
if (file) goto load_dyna;
@@ -6020,7 +6022,7 @@ Init_Proc()
rb_define_global_function("lambda", rb_f_lambda, 0);
rb_define_global_function("binding", rb_f_binding, 0);
rb_cBinding = rb_define_class("Binding", rb_cObject);
- rb_undef_method(CLASS_OF(rb_cMethod), "new");
+ rb_undef_method(CLASS_OF(rb_cBinding), "new");
rb_define_method(rb_cBinding, "clone", bind_clone, 0);
rb_cMethod = rb_define_class("Method", rb_cObject);
@@ -7361,10 +7363,13 @@ static int
rb_thread_loading(feature)
const char *feature;
{
- if (!rb_provided(feature)) return Qfalse; /* need to load */
if (!loading_tbl) {
loading_tbl = st_init_strtable();
}
+ if (!rb_provided(feature)) {
+ st_insert(loading_tbl, feature, 0);
+ return Qfalse; /* need to load */
+ }
while (st_lookup(loading_tbl, feature, 0)) {
CHECK_INTS;
rb_thread_schedule();