summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-09 03:58:01 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-09 03:58:01 (GMT)
commite6c88132a55a09ca578dd684bc681e14893c1c24 (patch)
tree30ed337a67dd310ac45c74b2590a60239d09b477 /load.c
parent404bf57aaffd64cb251574e2916e393d272f77a3 (diff)
load.c: fix r54521
* load.c (rb_f_load): do not convert the encoding twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/load.c b/load.c
index fc2e44b..1ae2fcb 100644
--- a/load.c
+++ b/load.c
@@ -698,16 +698,13 @@ static VALUE
rb_f_load(int argc, VALUE *argv)
{
VALUE fname, wrap, path, orig_fname;
- int safe;
rb_scan_args(argc, argv, "11", &fname, &wrap);
RUBY_DTRACE_HOOK(LOAD_ENTRY, StringValuePtr(fname));
- safe = rb_safe_level();
- orig_fname = rb_get_path_check_to_string(fname, safe);
- fname = rb_get_path_check_convert(fname, orig_fname, safe);
- fname = rb_str_encode_ospath(fname);
+ orig_fname = rb_get_path_check_to_string(fname, rb_safe_level());
+ fname = rb_str_encode_ospath(orig_fname);
path = rb_find_file(fname);
if (!path) {
if (!rb_file_load_ok(RSTRING_PTR(fname)))