summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-06 09:04:03 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-06 09:04:03 +0000
commit0ca799d43c24ec0ce26d59e4fabcc5a092eec9c7 (patch)
treecd2c1ec91ad57702c5b466ae2012cf957431b3d3 /eval.c
parentcb4d9ccf0322f5cec3e6fc16abc2925d50f14595 (diff)
19991206
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index ce78f5574c..1f00dff714 100644
--- a/eval.c
+++ b/eval.c
@@ -4834,6 +4834,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;
@@ -5991,7 +5992,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);
@@ -7332,9 +7333,12 @@ 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)) {
+ if (!loading_tbl) {
+ loading_tbl = st_init_strtable();
+ }
+ st_insert(loading_tbl, feature, 0);
+ return Qfalse; /* need to load */
}
while (st_lookup(loading_tbl, feature, 0)) {
CHECK_INTS;