1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_require_safe): prevent extension from loading twice.

fixed: [ruby-dev:29523]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-09-10 00:18:39 +00:00
parent 28fd8a2d91
commit 3ba3860f58
2 changed files with 11 additions and 8 deletions

View file

@ -1,7 +1,10 @@
Sun Sep 10 09:08:40 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
Tue Jan 10 09:18:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (stack_extend): fixed prototype.
* eval.c (rb_require_safe): prevent extension from loading twice.
fixed: [ruby-dev:29523]
Sat Sep 9 23:50:38 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* bignum.c (rb_big_mul0): bignum multiplication without

14
eval.c
View file

@ -7153,15 +7153,15 @@ rb_require_safe(fname, safe)
}
else {
ruby_safe_level = 0;
/* loading ruby library should be serialized. */
if (!loading_tbl) {
loading_tbl = st_init_strtable();
}
/* partial state */
ftptr = ruby_strdup(RSTRING_PTR(feature));
st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
switch (found) {
case 'r':
/* loading ruby library should be serialized. */
if (!loading_tbl) {
loading_tbl = st_init_strtable();
}
/* partial state */
ftptr = ruby_strdup(RSTRING(feature)->ptr);
st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
rb_load(path, 0);
break;