From: Austin Ziegler Date: 2003-07-21T04:10:39+09:00 Subject: Re: File.write(path, data)? On Mon, 21 Jul 2003 02:17:19 +0900, Yukihiro Matsumoto wrote: > on 03/07/20, Gavin Sinclair writes: > |I am glad to see File.read(path) in Ruby 1.8. But what about > |File.write(path, data)? > I've never felt the need for "write at once". Do you feel often? I actually use the pattern File.open(target, "w") { |f| f.print data } often enough that it might be nice to encapsulate it as: File.write(target, data). (I sometimes use f.puts instead of f.print, but if you're just writing what may be raw data, f.print is better.) -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.07.20 * 15:08:05