diff options
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 737fae479b..02e60fb62f 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -2356,4 +2356,15 @@ EOT end } 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 end |