[前][次][番号順一覧][スレッド一覧]

ruby-changes:46898

From: nobu <ko1@a...>
Date: Sun, 4 Jun 2017 16:29:58 +0900 (JST)
Subject: [ruby-changes:46898] nobu:r59013 (trunk): load.c: encode to OS path outside PUSH_TAG

nobu	2017-06-04 16:29:52 +0900 (Sun, 04 Jun 2017)

  New Revision: 59013

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59013

  Log:
    load.c: encode to OS path outside PUSH_TAG

  Modified files:
    trunk/load.c
Index: load.c
===================================================================
--- load.c	(revision 59012)
+++ load.c	(revision 59013)
@@ -966,22 +966,22 @@ rb_require_internal(VALUE fname, int saf https://github.com/ruby/ruby/blob/trunk/load.c#L966
 	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));
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]