summaryrefslogtreecommitdiffstats
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-13 05:59:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-13 05:59:01 +0000
commitb28112bf672cb14aeaf99a2b3e69f537de9f5c93 (patch)
tree2a781eb5bd6245b48d6abfcd26f157ac2a05e073 /load.c
parent7d053825eeb27465bf7def0f81f43d57b5847d9f (diff)
downloadruby-b28112bf672cb14aeaf99a2b3e69f537de9f5c93.tar.gz
ruby-b28112bf672cb14aeaf99a2b3e69f537de9f5c93.tar.xz
ruby-b28112bf672cb14aeaf99a2b3e69f537de9f5c93.zip
* load.c (rb_require_safe): FilePathValue() implies rb_str_new4().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/load.c b/load.c
index 645dca204..6e554f1d8 100644
--- a/load.c
+++ b/load.c
@@ -545,7 +545,7 @@ load_ext(VALUE path)
VALUE
rb_require_safe(VALUE fname, int safe)
{
- VALUE result = Qnil;
+ volatile VALUE result = Qnil;
rb_thread_t *th = GET_THREAD();
volatile VALUE errinfo = th->errinfo;
int state;
@@ -563,7 +563,6 @@ rb_require_safe(VALUE fname, int safe)
rb_set_safe_level_force(safe);
FilePathValue(fname);
- RB_GC_GUARD(fname) = rb_str_new4(fname);
rb_set_safe_level_force(0);
found = search_required(fname, &path);
if (found) {