Hi Florian,

Thanks a lot for your response!

Florian Gross <flgr / ccan.de> wrote:
> irb(main):009:0> File.open("NUL") { |f| f.read }
> => ""
> 
> It is not returning nil, it returns an empty String instead. Probably 
> best to use p() or IRB when you're checking things like this. There's 
> also File.read(fn) which might help with simplifying code.

I am completely confused.  The documentation says it should print nil:

http://www.rubycentral.com/book/ref_c_io.html#IO.read

It does return nil in my first test case.  It does not return nil in
my second test case which is identical to your test case and as far as
I can see shows the same problem.

So why the difference in behavior?  It's still completely baffling me.

Thanks again for your help.  I am hoping I can get a proof-of-concept
replacement for dot.kde.org up some time in the distant future.  If
it's successful, this would be another high profile site running on
Ruby.

Cheers,
Navin.