mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
* 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/trunk@34795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
85738261a5
commit
eec0b2d88a
5 changed files with 44 additions and 15 deletions
|
@ -2367,4 +2367,15 @@ EOT
|
|||
}
|
||||
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")]
|
||||
encs = with_tmpdir {
|
||||
paths.map {|path|
|
||||
open(path, "wb") {|f| f.inspect.encoding}
|
||||
}
|
||||
}
|
||||
assert_equal(paths.map(&:encoding), encs, bug6072)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue