summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-15 14:50:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-15 14:50:49 +0000
commit4755f0d2e7216acdab91826b4a2272016bfde7c6 (patch)
treecd446dd300d34a983c0400f1580180445a8caf98
parent9d211e580c46ea755dd980a0e01045e90261ae09 (diff)
downloadruby-4755f0d2e7216acdab91826b4a2272016bfde7c6.tar.gz
ruby-4755f0d2e7216acdab91826b4a2272016bfde7c6.tar.xz
ruby-4755f0d2e7216acdab91826b4a2272016bfde7c6.zip
* eval.c (rb_require_safe): wait for another thread requiring the same
feature. fixed: [ruby-core:08229] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--eval.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ed697ff9..4cccefdf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jul 15 23:50:12 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (rb_require_safe): wait for another thread requiring the same
+ feature. fixed: [ruby-core:08229]
+
Sat Jul 15 01:27:13 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (has_magic): glob names contain alphabets to enable case fold
diff --git a/eval.c b/eval.c
index d16549178..c05abffe6 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;
}
}