[ruby-trunk - Bug #6072][Open] [Windows] Dir.inspect returns the path in file system encoding

Issue #6072 has been reported by Nobuyoshi N…


Bug #6072: [Windows] Dir.inspect returns the path in file system
encoding

Author: Nobuyoshi N.
Status: Open
Priority: Normal
Assignee:
Category: M17N
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-02-24 trunk 34779) [i386-mingw32]

=begin
同じく http://toro.2ch.net/test/read.cgi/tech/1324826777/711 から引用

1.9.3p125 で Dirオブジェクトを表示しようとすると
p Dir.open(‘R:/テストディレクトリ’) # => #Dir:R:/???????????????????????????
2.0.0dev (2012-02-19) ではエラーになります
p Dir.open(‘R:/テストディレクトリ’) # => inspected result must be ASCII only or
use the same encoding with default external
(Encoding::CompatibilityError)

1.9.2以下では
p Dir.open(‘R:/テストディレクトリ’) # => #Dir:R:/テストディレクトリ
シフトJISのパスしか受け付けてくれませんけどね
=end