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
This commit is contained in:
parent
0866b8e83a
commit
86ae6129cb
4
load.c
4
load.c
@ -966,22 +966,22 @@ rb_require_internal(VALUE fname, int safe)
|
|||||||
int safe;
|
int safe;
|
||||||
} volatile saved;
|
} volatile saved;
|
||||||
char *volatile ftptr = 0;
|
char *volatile ftptr = 0;
|
||||||
|
VALUE path;
|
||||||
|
|
||||||
RUBY_DTRACE_HOOK(REQUIRE_ENTRY, StringValuePtr(fname));
|
RUBY_DTRACE_HOOK(REQUIRE_ENTRY, StringValuePtr(fname));
|
||||||
|
|
||||||
fname = rb_get_path_check(fname, safe);
|
fname = rb_get_path_check(fname, safe);
|
||||||
|
path = rb_str_encode_ospath(fname);
|
||||||
|
|
||||||
TH_PUSH_TAG(th);
|
TH_PUSH_TAG(th);
|
||||||
saved.safe = rb_safe_level();
|
saved.safe = rb_safe_level();
|
||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
VALUE path;
|
|
||||||
long handle;
|
long handle;
|
||||||
int found;
|
int found;
|
||||||
|
|
||||||
rb_set_safe_level_force(0);
|
rb_set_safe_level_force(0);
|
||||||
|
|
||||||
RUBY_DTRACE_HOOK(FIND_REQUIRE_ENTRY, StringValuePtr(fname));
|
RUBY_DTRACE_HOOK(FIND_REQUIRE_ENTRY, StringValuePtr(fname));
|
||||||
path = rb_str_encode_ospath(fname);
|
|
||||||
found = search_required(path, &path, safe);
|
found = search_required(path, &path, safe);
|
||||||
RUBY_DTRACE_HOOK(FIND_REQUIRE_RETURN, StringValuePtr(fname));
|
RUBY_DTRACE_HOOK(FIND_REQUIRE_RETURN, StringValuePtr(fname));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user