Yeah, hey sorry for getting so uptight guys, but it was really crazy, 
and I was missing a goal time for showing something to my boss. 

I won't have time to put together something solid as an example until 
tomorrow night, but I'll try to give you guys my version and all that.  
The really crazy thing is I was taking a filesize too, and when I tried 
to test it, which I parsef from a split of a text record line, it bombed 
out there too.  Now said record was written for the same file. 

The behavior was the kind of thing you see in C when you're going out of 
bounds with some memory.  Is there some memory bounds debug thing I can 
check for such a problem with?

Sincerely, Xeno
xc

Jamis Buck wrote:

> Xeno,
>
> It works for me:
>
>   > touch empty.txt
>   > irb
>   irb> File.read('empty.txt').size
>   -> 0
>
> Can you give an example where it breaks?
>
> - Jamis
>
> On Oct 18, 2005, at 4:49 PM, Xeno Campanoli wrote:
>
>> Yeah, I'm pissed.  This kind of thing shouldn't happen.
>>
>> You read in a file.  It's empty.  You get an empty file in what  
>> you'd think
>> was a string, so you take the length, and it blows up the world in  
>> other
>> parts of your program!  You check to see if it's a string with an:
>>
>>     contentvariable.is_a?String
>>
>> and sure enough, it thinks it's a String, but sure enough, when you go
>>
>> if contentvariable.size then
>>
>> it also blows up with that synonym.  Sorry to be less than cordial  
>> here, but
>> I really would have liked this to work.
>>
>> Sincerely, Xeno Campanoli, working with Ruby on the Job.
>> xc
>>
>>
>
>
>
>

-- 
Xeno Campanoli:  http://www.eskimo.com/~xeno
The real disaster is ANY TIME WE GET A BUSH FOR PRESIDENT!