aboutsummaryrefslogtreecommitdiffstats
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-04 07:29:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-04 07:29:52 +0000
commit9efd64a833a2b9e19c2b4506ad151395858c875c (patch)
tree77ef96a4b29e0aff1c9fc06329f5731b7ee6e181 /load.c
parent16c18fa4bc05b125e08bf8a8fe003457198b92a6 (diff)
downloadruby-9efd64a833a2b9e19c2b4506ad151395858c875c.tar.gz
load.c: encode to OS path outside PUSH_TAG
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/load.c b/load.c
index 13f3bf43e4..1304f1b900 100644
--- a/load.c
+++ b/load.c
@@ -966,22 +966,22 @@ rb_require_internal(VALUE fname, int safe)
int safe;
} volatile saved;
char *volatile ftptr = 0;
+ VALUE path;
RUBY_DTRACE_HOOK(REQUIRE_ENTRY, StringValuePtr(fname));
fname = rb_get_path_check(fname, safe);
+ path = rb_str_encode_ospath(fname);
TH_PUSH_TAG(th);
saved.safe = rb_safe_level();
if ((state = EXEC_TAG()) == 0) {
- VALUE path;
long handle;
int found;
rb_set_safe_level_force(0);
RUBY_DTRACE_HOOK(FIND_REQUIRE_ENTRY, StringValuePtr(fname));
- path = rb_str_encode_ospath(fname);
found = search_required(path, &path, safe);
RUBY_DTRACE_HOOK(FIND_REQUIRE_RETURN, StringValuePtr(fname));