On Tue, 4 May 2004, Yukihiro Matsumoto wrote:

> Hi,
> 
> In message "IO::write"
>     on 04/05/04, Charles Comstock <cc1 / cec.wustl.edu> writes:
> 
> |Why is there only an IO::read, and no equivalent IO::write that takes a 
> |filename, a string to write, and an optional offset in the file to start 
> |writing at?  Or better yet an IO::write(filename[,offset])= string to 
> |write to file.  I don't know it seems useful to me for quickly writing a 
> |response out to a file anyone else?
> 
> IO::read is a equivalent of 
> 
>   IO::open(path, "r"){|f| f.read(*args)}
> 
> But IO::write that is
> 
>   IO::open(path, "w"){|f| f.write(*args)}
> 
> is, for my eyes, useless for most of the cases.  Besides that, I don't
> feel it is intuitive that IO::write to "open, then write once, then
> close".  Even if we decide to implement the method, we should prepare
> better name.
> 
> 							matz.

IO#cat  ??

-a
-- 
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL     :: http://www.ngdc.noaa.gov/stp/
| TRY     :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done 
===============================================================================