ruby-changes:42449
From: nobu <ko1@a...>
Date: Sat, 9 Apr 2016 12:01:26 +0900 (JST)
Subject: [ruby-changes:42449] nobu:r54523 (trunk): load.c: fix r54521
nobu 2016-04-09 12:58:01 +0900 (Sat, 09 Apr 2016) New Revision: 54523 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54523 Log: load.c: fix r54521 * load.c (rb_f_load): do not convert the encoding twice. Modified files: trunk/load.c Index: load.c =================================================================== --- load.c (revision 54522) +++ load.c (revision 54523) @@ -698,16 +698,13 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/load.c#L698 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))) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/