2008/9/15 kwatch <kwatch / gmail.com>:
> Hi,
>
> I have questions about IO and File class.
>
> * Why is IO.read(filename) defined?

I don't know.

>  IMO, File.read() is more natural than IO.read() because
>  IO class is not related to filename, I think.

You can as well use File.read().

> * Is there any reason that IO.write() (or File.write()) is not
> provided?
>  I have to define File.write() for each project...

Why don't you just create a library of things you regularly need and
require that?

>  It is easy to define File.write() but I hope it is provided by Ruby.

Probably because writing is more dangerous and also there are more
options to file writing than to read (beginning vs. at end, create or
not, text vs. binary).

Kind regards

robert

-- 
use.inject do |as, often| as.you_can - without end