From: Suraj Kurapati Date: 2009-02-03T13:08:09+09:00 Subject: [ruby-core:21789] [Feature #1081] add File::write() convenience method Issue #1081 has been updated by Suraj Kurapati. Hi, Sorry for my late response. Matz wrote: > What do you think proper API for combined File.open? > > File::write(path, string, mode, opt) I prefer this order of parameters because it feels natural: File::open('hello.txt', 'r').read() File::read('hello.txt') File::open('hello.txt', 'w').write('hello') File::write('hello.txt', 'hello') In addition, the Facets library also perfers this order: http://facets.rubyforge.org/doc/api/core/classes/File.html#M000241 > or > > File::write(string, path, mode, opt) > > The latter would conflict with some in-house definition of File::write. Then, to minimize disruption, let us avoid this latter order of parameters. Thanks for your consideration. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1081 ---------------------------------------- http://redmine.ruby-lang.org