On Mon, Aug 18, 2008 at 8:08 PM, Nobuyoshi Nakada <nobu / ruby-lang.org> wrote: > Hi, > > At Tue, 19 Aug 2008 02:07:03 +0900, > Luis Lavena wrote in [ruby-core:18328]: >> File.zero? always return false when a Directory is being requested >> (*nix), so similar thinking on Windows will reduce the surprise >> factor, right? > > File.zero? isn't the real issue. I can't imagine why you want > to use File.size for a directory. It is a just garbage, I > think. In what case is it usable? > Don't look at me, I never thought about using it that way, but if someone reported it maybe someone is using it wrongly? >> Also the File.zero? documentation can be updated to reflect that >> File.zero? is not reliable across platforms given the same scenario. > > May Dir#empty? or something else be "expected" method? > If this bug report came from the RubySpec, then the expectations are bad... and the documentation can reflect this. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams