On Fri, Oct 28, 2011 at 07:28, Usaku NAKAMURA <redmine / ruby-lang.org> wrote:

> Sorry, I can't understand your point.
> If you think there is a bug, would you show us the bug by code?

That°«s hard to do, but name a file in an encoding other than
'filesystem' on an NTFS filesystem.  What I did was accidentally
create a file whose name was encoded in UTF-16.  Then, do
Dir['dir'].entries.each{ |e| printf "%p: %s\n", e, File.file? e },
where 'dir' is the directory containing this file.  e.file? will
return false for this file, even though it°«s a file.  The problem is,
as explained, in rb_stat(), as it re-encodes its argument in the
'filesystem' encoding.