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

ruby-changes:35242

From: nagachika <ko1@a...>
Date: Sun, 31 Aug 2014 01:05:04 +0900 (JST)
Subject: [ruby-changes:35242] nagachika:r47324 (ruby_2_1): merge revision(s) r46441: [Backport #9946]

nagachika	2014-08-31 01:04:47 +0900 (Sun, 31 Aug 2014)

  New Revision: 47324

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

  Log:
    merge revision(s) r46441: [Backport #9946]
    
    * process.c (open): use UTF-8 version function to support
      non-ascii path properly.  [ruby-core:63185] [Bug #9946]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/process.c
    branches/ruby_2_1/test/ruby/test_process.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 47323)
+++ ruby_2_1/ChangeLog	(revision 47324)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Sun Aug 31 00:54:47 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* process.c (open): use UTF-8 version function to support
+	  non-ascii path properly.  [ruby-core:63185] [Bug #9946]
+
 Tue Aug 26 00:08:40 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (RUBY_SETJMP_TYPE): check for setjmp type after
Index: ruby_2_1/process.c
===================================================================
--- ruby_2_1/process.c	(revision 47323)
+++ ruby_2_1/process.c	(revision 47324)
@@ -86,6 +86,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/process.c#L86
 # include <mach/mach_time.h>
 #endif
 
+/* define system APIs */
+#ifdef _WIN32
+#undef open
+#define open	rb_w32_uopen
+#endif
+
 #if defined(HAVE_TIMES) || defined(_WIN32)
 static VALUE rb_cProcessTms;
 #endif
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 47323)
+++ ruby_2_1/version.h	(revision 47324)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
-#define RUBY_RELEASE_DATE "2014-08-26"
-#define RUBY_PATCHLEVEL 213
+#define RUBY_RELEASE_DATE "2014-08-31"
+#define RUBY_PATCHLEVEL 214
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 26
+#define RUBY_RELEASE_DAY 31
 
 #include "ruby/version.h"
 
Index: ruby_2_1/test/ruby/test_process.rb
===================================================================
--- ruby_2_1/test/ruby/test_process.rb	(revision 47323)
+++ ruby_2_1/test/ruby/test_process.rb	(revision 47324)
@@ -606,6 +606,16 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/ruby/test_process.rb#L606
     }
   end
 
+  def test_execopts_redirect_nonascii_path
+    bug9946 = '[ruby-core:63185] [Bug #9946]'
+    with_tmpchdir {|d|
+      path = "t-\u{30c6 30b9 30c8 f6}.txt"
+      system(*ECHO["a"], out: path)
+      assert_file.for(bug9946).exist?(path)
+      assert_equal("a\n", File.read(path), bug9946)
+    }
+  end
+
   def test_execopts_redirect_dup2_child
     with_tmpchdir {|d|
       Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r46441


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

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