mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
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
This commit is contained in:
parent
b7a3410641
commit
2e86a92b3c
4 changed files with 22 additions and 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>
|
Fri Sep 5 13:53:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (parser_yylex): fix invalid char in eval, should raise
|
* 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 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)
|
#if defined(HAVE_TIMES) || defined(_WIN32)
|
||||||
static VALUE rb_cProcessTms;
|
static VALUE rb_cProcessTms;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -602,6 +602,16 @@ class TestProcess < Test::Unit::TestCase
|
||||||
}
|
}
|
||||||
end
|
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
|
def test_execopts_redirect_dup2_child
|
||||||
with_tmpchdir {|d|
|
with_tmpchdir {|d|
|
||||||
Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",
|
Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define RUBY_VERSION "2.0.0"
|
#define RUBY_VERSION "2.0.0"
|
||||||
#define RUBY_RELEASE_DATE "2014-09-05"
|
#define RUBY_RELEASE_DATE "2014-09-05"
|
||||||
#define RUBY_PATCHLEVEL 553
|
#define RUBY_PATCHLEVEL 554
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2014
|
#define RUBY_RELEASE_YEAR 2014
|
||||||
#define RUBY_RELEASE_MONTH 9
|
#define RUBY_RELEASE_MONTH 9
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue