From: Matt Armstrong Date: 2002-02-06T01:41:49+09:00 Subject: Re: Ruby bug? IO.close doesn't check for error matz@ruby-lang.org (Yukihiro Matsumoto) writes: > In message "Ruby bug? IO.close doesn't check for error" > on 02/02/05, Matt Armstrong writes: > > |It is possible for fclose() to fail (for example, when fclose() > needs |to flush buffers to disk and those writes fail due to a disk > full |condition). I was surprised to find that fptr_finalize did > not check |for this failure. > | > |I'd suggest something like the patch below. > > "fptr_finalize" may be called from GC, in which case raising error > is useless (too late). Yes, I agree. I wondered about that. ;-) > So how do you think raising exception in explicit "close" call? Yes an exception would be useful then. And when the block form of File::open finishes, etc. It will be hard to write a rubicon test case for this behavior though. ;-) -- matt