Skip to content

Commit fad6928

Browse files
committed
merge revision(s) r46441: [Backport ruby#9946]
* process.c (open): use UTF-8 version function to support non-ascii path properly. [ruby-core:63185] [Bug ruby#9946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@47324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 66ea2f0 commit fad6928

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sun Aug 31 00:54:47 2014 Nobuyoshi Nakada <[email protected]>
2+
3+
* process.c (open): use UTF-8 version function to support
4+
non-ascii path properly. [ruby-core:63185] [Bug #9946]
5+
16
Tue Aug 26 00:08:40 2014 Nobuyoshi Nakada <[email protected]>
27

38
* configure.in (RUBY_SETJMP_TYPE): check for setjmp type after

process.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
# include <mach/mach_time.h>
8787
#endif
8888

89+
/* define system APIs */
90+
#ifdef _WIN32
91+
#undef open
92+
#define open rb_w32_uopen
93+
#endif
94+
8995
#if defined(HAVE_TIMES) || defined(_WIN32)
9096
static VALUE rb_cProcessTms;
9197
#endif

test/ruby/test_process.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,16 @@ def test_execopts_redirect
606606
}
607607
end
608608

609+
def test_execopts_redirect_nonascii_path
610+
bug9946 = '[ruby-core:63185] [Bug #9946]'
611+
with_tmpchdir {|d|
612+
path = "t-\u{30c6 30b9 30c8 f6}.txt"
613+
system(*ECHO["a"], out: path)
614+
assert_file.for(bug9946).exist?(path)
615+
assert_equal("a\n", File.read(path), bug9946)
616+
}
617+
end
618+
609619
def test_execopts_redirect_dup2_child
610620
with_tmpchdir {|d|
611621
Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",

version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#define RUBY_VERSION "2.1.2"
2-
#define RUBY_RELEASE_DATE "2014-08-26"
3-
#define RUBY_PATCHLEVEL 213
2+
#define RUBY_RELEASE_DATE "2014-08-31"
3+
#define RUBY_PATCHLEVEL 214
44

55
#define RUBY_RELEASE_YEAR 2014
66
#define RUBY_RELEASE_MONTH 8
7-
#define RUBY_RELEASE_DAY 26
7+
#define RUBY_RELEASE_DAY 31
88

99
#include "ruby/version.h"
1010

0 commit comments

Comments
 (0)