I submitted that original bug (first time using redmine :)). Here's some mo=
re context:

File.zero? on Windows when given a directory name produces a nonsensical re=
sult. It should do one of the following:

1) Provide consistent results given a directory name on both Windows and *n=
ix
2) Throw an exception since File !=3D Directory

Since 2) is not the Ruby Way, it makes more sense to either do 1), or mark =
its behavior as "undefined", or "platform specific" which will let individu=
al implementations decide how to define it.

Does this sound reasonable to folks?


Thanks,
-John


> -----Original Message-----
> From: Nobuyoshi Nakada [mailto:nobu / ruby-lang.org]
> Sent: Friday, August 15, 2008 7:43 PM
> To: ruby-core / ruby-lang.org
> Subject: [ruby-core:18315] Re: [Bug #449] File.zero? returns true when
> given a directory on Windows
>
> Hi,
>
> At Sat, 16 Aug 2008 06:35:31 +0900,
> Anonymous wrote in [ruby-core:18314]:
> > Bug #449: File.zero? returns true when given a directory on Windows
>
> > On Mac OS X File.zero? returns false when given a directory.
>
> It is very file-system dependent behavior, and the result has no
> meaning on any systems.
>
> On unix-like systems, size of properly created directory can never be
> 0, since there are "." and ".." always.
>
> # `properly' means it is created with mkdir system call, but # not
> mknod syscall by root.
>
> On the other hand, Windows claims "size of a directory always must be
> 0".
>
> --
> Nobu Nakada
>