ruby-changes:35322
From: usa <ko1@a...>
Date: Fri, 5 Sep 2014 14:06:12 +0900 (JST)
Subject: [ruby-changes:35322] usa:r47404 (ruby_2_0_0): merge revision(s) 46441: [Backport #9946]
usa 2014-09-05 14:05:42 +0900 (Fri, 05 Sep 2014) New Revision: 47404 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47404 Log: merge revision(s) 46441: [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_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/process.c branches/ruby_2_0_0/test/ruby/test_process.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 47403) +++ ruby_2_0_0/ChangeLog (revision 47404) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Fri Sep 5 14:00:33 2014 Nobuyoshi Nakada <nobu@r...> + + * process.c (open): use UTF-8 version function to support + non-ascii path properly. [ruby-core:63185] [Bug #9946] + Fri Sep 5 13:53:41 2014 Nobuyoshi Nakada <nobu@r...> * parse.y (parser_yylex): fix invalid char in eval, should raise Index: ruby_2_0_0/process.c =================================================================== --- ruby_2_0_0/process.c (revision 47403) +++ ruby_2_0_0/process.c (revision 47404) @@ -82,6 +82,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/process.c#L82 #define numberof(array) (int)(sizeof(array)/sizeof((array)[0])) +/* 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_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 47403) +++ ruby_2_0_0/version.h (revision 47404) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-09-05" -#define RUBY_PATCHLEVEL 553 +#define RUBY_PATCHLEVEL 554 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 9 Index: ruby_2_0_0/test/ruby/test_process.rb =================================================================== --- ruby_2_0_0/test/ruby/test_process.rb (revision 47403) +++ ruby_2_0_0/test/ruby/test_process.rb (revision 47404) @@ -602,6 +602,16 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_process.rb#L602 } 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_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r46441 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/