From: Run Paint Run Run Date: 2010-03-07T02:32:56+09:00 Subject: [ruby-core:28536] [Feature #1081] add File::write() convenience method Issue #1081 has been updated by Run Paint Run Run. File 0001-io.c-io_s_write-io_s_binwrite-Re-add-IO.write-binwri.patch added For example, with the usual caveat that I don't speak C, the attached patch passes the following RubySpec: http://goo.gl/RcAW (the two methods are treated as aliases because I haven't looked at testing binmode under Linux). I suspect that if it was rewritten by somebody who knew what they were doing it would satisfy the original reporter and simplify the common idiom of "File.open('/tmp/glark','w'){|f| f << 'string'}". If more functionality is desired, IO.open can be used or another ticket can be opened. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1081 ---------------------------------------- http://redmine.ruby-lang.org