summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/eval.c b/eval.c
index 220af6829..81d380eb8 100644
--- a/eval.c
+++ b/eval.c
@@ -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;