diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-25 12:25:55 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-25 12:25:55 +0000 |
commit | 5e808b6ba38dbd974b617e80e2cf054eaaca604f (patch) | |
tree | 14d1fb78d676ba0073bc701136cda1d884a40292 /test/ruby/test_io_m17n.rb | |
parent | 1b21d03d76640db4c7c96709b78d973950385b1a (diff) | |
download | ruby-5e808b6ba38dbd974b617e80e2cf054eaaca604f.tar.gz |
merge revision(s) 34794,34795:
* dir.c (dir_initialize): keep path in original encoding.
* error.c (syserr_initialize): prefer the encoding of message over
locale. [ruby-dev:45279][Bug #6071]
* dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.
[Bug #6072]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 13d792b633..2f71356f8e 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -2326,6 +2326,17 @@ EOT } end if /mswin|mingw/ =~ RUBY_PLATFORM + def test_error_nonascii + bug6071 = '[ruby-dev:45279]' + paths = ["\u{3042}".encode("sjis"), "\u{ff}".encode("iso-8859-1")] + encs = with_tmpdir { + paths.map {|path| + open(path) rescue $!.message.encoding + } + } + assert_equal(paths.map(&:encoding), encs, bug6071) + end + def test_inspect_nonascii bug6072 = '[ruby-dev:45280]' paths = ["\u{3042}".encode("sjis"), "\u{ff}".encode("iso-8859-1")] |