ruby-changes:22031
From: marcandre <ko1@a...>
Date: Tue, 20 Dec 2011 15:52:19 +0900 (JST)
Subject: [ruby-changes:22031] marcandRe: r34079 (ruby_1_9_3): * io.c: Improve rdoc for {File|IO}.write
marcandre 2011-12-20 15:52:04 +0900 (Tue, 20 Dec 2011) New Revision: 34079 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34079 Log: * io.c: Improve rdoc for {File|IO}.write Modified files: branches/ruby_1_9_3/io.c Index: ruby_1_9_3/io.c =================================================================== --- ruby_1_9_3/io.c (revision 34078) +++ ruby_1_9_3/io.c (revision 34079) @@ -8506,12 +8506,14 @@ * * specifies perm argument for open(). * - * open_args: array of strings + * open_args: array * * specifies arguments for open() as an array. * - * IO.write("testfile", "0123456789") #=> "0123456789" - * IO.write("testfile", "0123456789", 20) #=> "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" + * IO.write("testfile", "0123456789", 20) # => 10 + * # File could contain: "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" + * IO.write("testfile", "0123456789") #=> 10 + * # File would now read: "0123456789" */ static VALUE @@ -8524,15 +8526,17 @@ * call-seq: * IO.binwrite(name, string, [offset] ) => fixnum * - * Opens the file, optionally seeks to the given <i>offset</i>, write + * Opens the file, optionally seeks to the given <i>offset</i>, writes * <i>string</i> then returns the length written. * <code>binwrite</code> ensures the file is closed before returning. * The open mode would be "wb:ASCII-8BIT". * If <i>offset</i> is not given, the file is truncated. Otherwise, * it is not truncated. * - * IO.binwrite("testfile", "0123456789") #=> "0123456789" - * IO.binwrite("testfile", "0123456789", 20) #=> "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" + * IO.binwrite("testfile", "0123456789", 20) # => 10 + * # File could contain: "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" + * IO.binwrite("testfile", "0123456789") #=> 10 + * # File would now read: "0123456789" */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/