<snip>

> It looks like a bug (that is, it doesn't happen that way on my 
box).

Is it a windows or *nix box?  and can you read files over 4 gigs in 
size?

> I'm guessing that it's a signed <vs> unsigned integer problem. When it
> wraps around, does it start out at negative one and go upward fro
> increasing file sizes?
> 
> > Is there a work around?
> 
> try:
>    [File.stat("filename").size].pack("i").unpack("I")
> 

Thats cool and does work for files less than 4 gigs but (obviously) 
fails for larger files.

> This packs the number as a signed integer, and unpacks it as an 
> unsigned one. If it works, you can make a quick function:
> 
>    class Integer
>      def unsign() [self].pack("i").unpack("I") end
>    end
> 
> and...
>    File.stat("somefile").size.unsign
> 
> --Mark
> 
> 

Thanks,


Walt
*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO.        email : walter / mwsewall.com     
259 Front St.            Phone : (207) 442-7994 x 128
Bath, ME 04530           Fax   : (207) 443-6284
*****************************************************