* eval.c (rb_require_safe): prevent extension from loading twice.
fixed: [ruby-dev:29523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4569783b2c
commit
36e79167ab
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jan 10 09:18:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_require_safe): prevent extension from loading twice.
|
||||||
|
fixed: [ruby-dev:29523]
|
||||||
|
|
||||||
Sat Sep 9 23:55:28 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Sat Sep 9 23:55:28 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* file.c (rb_f_test): test(0) should not have any special
|
* file.c (rb_f_test): test(0) should not have any special
|
||||||
|
4
eval.c
4
eval.c
@ -7068,8 +7068,6 @@ rb_require_safe(VALUE fname, int safe)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ruby_safe_level = 0;
|
ruby_safe_level = 0;
|
||||||
switch (found) {
|
|
||||||
case 'r':
|
|
||||||
/* loading ruby library should be serialized. */
|
/* loading ruby library should be serialized. */
|
||||||
if (!loading_tbl) {
|
if (!loading_tbl) {
|
||||||
loading_tbl = st_init_strtable();
|
loading_tbl = st_init_strtable();
|
||||||
@ -7077,6 +7075,8 @@ rb_require_safe(VALUE fname, int safe)
|
|||||||
/* partial state */
|
/* partial state */
|
||||||
ftptr = ruby_strdup(RSTRING_PTR(path));
|
ftptr = ruby_strdup(RSTRING_PTR(path));
|
||||||
st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
|
st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
|
||||||
|
switch (found) {
|
||||||
|
case 'r':
|
||||||
rb_load(path, 0);
|
rb_load(path, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user