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

ruby-changes:43193

From: usa <ko1@a...>
Date: Fri, 3 Jun 2016 18:06:24 +0900 (JST)
Subject: [ruby-changes:43193] usa:r55267 (trunk): * ruby.c (process_options): need to duplicate path before passing it to

usa	2016-06-03 18:06:19 +0900 (Fri, 03 Jun 2016)

  New Revision: 55267

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

  Log:
    * ruby.c (process_options): need to duplicate path before passing it to
      rb_str_conv_enc() because the function might call rb_enc_associate()
      internally.  this fixes test failures on Windows introduced at r55260.

  Modified files:
    trunk/ChangeLog
    trunk/ruby.c
Index: ruby.c
===================================================================
--- ruby.c	(revision 55266)
+++ ruby.c	(revision 55267)
@@ -1568,7 +1568,7 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1568
 	    VALUE path = RARRAY_AREF(load_path, i);
 	    int mark = rb_attr_get(path, id_initial_load_path_mark) == path;
 #if UTF8_PATH
-	    path = rb_str_conv_enc(path, uenc, lenc);
+	    path = rb_str_conv_enc(rb_str_dup(path), uenc, lenc);
 #else
 	    path = rb_enc_associate(rb_str_dup(path), lenc);
 #endif
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55266)
+++ ChangeLog	(revision 55267)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jun  3 18:04:37 2016  NAKAMURA Usaku  <usa@r...>
+
+	* ruby.c (process_options): need to duplicate path before passing it to
+	  rb_str_conv_enc() because the function might call rb_enc_associate()
+	  internally.  this fixes test failures on Windows introduced at r55260.
+
 Fri Jun  3 17:44:25 2016  Reiner Herrmann  <reiner@r...>
 
 	* lib/mkmf.rb (create_makefile): sort lists of source and object

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

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