diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 05:05:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 05:05:42 +0000 |
commit | 2e86a92b3c9153bc5bc47e5684ab3ace70d824ae (patch) | |
tree | f1e2a319f2a2b5e9d4a50732e2c8571ce520c684 | |
parent | b7a3410641ec76769496d7e2d71f369f3add0b44 (diff) |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | process.c | 6 | ||||
-rw-r--r-- | test/ruby/test_process.rb | 10 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Sep 5 14:00:33 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@ruby-lang.org> * parse.y (parser_yylex): fix invalid char in eval, should raise @@ -82,6 +82,12 @@ #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 diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index c760e8ebda..8b79d35738 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -602,6 +602,16 @@ class TestProcess < Test::Unit::TestCase } 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'", @@ -1,6 +1,6 @@ #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 |