diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-19 15:25:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-19 15:25:49 +0000 |
commit | 60a7b3a935ebb02703a80f4aa8888d3ac3fcfc98 (patch) | |
tree | b0fede55239d29ee869f1acf58ea9744aa762719 | |
parent | db00c782f4d477e04217b8da9782d9fe3c515675 (diff) | |
download | ruby-60a7b3a935ebb02703a80f4aa8888d3ac3fcfc98.tar.gz |
* eval.c (search_required): required name must not be changed before
loading. [ruby-dev:24492]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 6 |
2 files changed, 6 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Wed Oct 20 00:25:41 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (search_required): required name must not be changed before + loading. [ruby-dev:24492] + Tue Oct 19 23:59:46 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * eval.c (rb_require_safe): provide the feature after loaded. @@ -6678,7 +6678,7 @@ search_required(fname, featurep, path) char *ext, *ftptr; int type; - *featurep = fname; + *featurep = fname = rb_str_new4(fname); *path = 0; ext = strrchr(ftptr = RSTRING(fname)->ptr, '.'); if (ext && !strchr(ext, '/')) { @@ -6777,10 +6777,6 @@ rb_require_safe(fname, safe) /* partial state */ ftptr = ruby_strdup(RSTRING(feature)->ptr); st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread); - if (feature == fname && !OBJ_FROZEN(feature)) { - feature = rb_str_dup(feature); - OBJ_FREEZE(feature); - } rb_load(path, 0); break; |