From 131824065d58465d03536167290083b2c0ccc1e0 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 25 Jan 2005 04:03:02 +0000 Subject: fix some documents. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index b8e25c19eb..39eb659d11 100644 --- a/io.c +++ b/io.c @@ -663,7 +663,7 @@ rb_io_seek_m(argc, argv, io) /* * call-seq: - * ios.pos = integer => 0 + * ios.pos = integer => integer * * Seeks to the given position (in bytes) in ios. * @@ -1694,7 +1694,7 @@ rb_io_readline(argc, argv, io) * * Reads all of the lines in ios, and returns them in * anArray. Lines are separated by the optional - * sep_string. If set_string is nil, the + * sep_string. If sep_string is nil, the * rest of the stream is returned as a single record. * The stream must be opened for reading or an * IOError will be raised. @@ -2242,7 +2242,7 @@ rb_io_sysseek(argc, argv, io) /* * call-seq: - * ios.syswrite(string ) => integer + * ios.syswrite(string) => integer * * Writes the given string to ios using a low-level write. * Returns the number of bytes written. Do not mix with other methods @@ -3131,7 +3131,7 @@ rb_io_s_sysopen(argc, argv) /* * call-seq: * open(path [, mode [, perm]] ) => io or nil - * open(path [, mode [. perm]] ) {|io| block } => nil + * open(path [, mode [, perm]] ) {|io| block } => obj * * Creates an IO object connected to the given stream, * file, or subprocess. @@ -3144,8 +3144,8 @@ rb_io_s_sysopen(argc, argv) * * If a block is specified, it will be invoked with the * File object as a parameter, and the file will be - * automatically closed when the block terminates. The call always - * returns nil in this case. + * automatically closed when the block terminates. The call + * returns the value of the block. * * If path starts with a pipe character, a subprocess is * created, connected to the caller by a pair of pipes. The returned @@ -3790,8 +3790,7 @@ rb_p(obj) /* for debug print within C code */ * * For each object, directly writes * _obj_.+inspect+ followed by the current output - * record separator to the program's standard output. +p+ - * bypasses the Ruby I/O libraries. + * record separator to the program's standard output. * * S = Struct.new(:name, :state) * s = S['dave', 'TX'] @@ -4356,7 +4355,7 @@ rb_gets() /* * call-seq: - * readline(separator=$/ => string + * readline(separator=$/) => string * * Equivalent to Kernel::gets, except * +readline+ raises +EOFError+ at end of file. @@ -4398,7 +4397,7 @@ rb_f_getc() * readlines(separator=$/) => array * * Returns an array containing the lines returned by calling - * Kernel.gets(aString) until the end of file. + * Kernel.gets(separator) until the end of file. */ static VALUE @@ -5064,7 +5063,7 @@ io_s_read(arg) /* * call-seq: - * IO.read(rane, [length [, offset]] ) => string + * IO.read(name, [length [, offset]] ) => string * * Opens the file, optionally seeks to the given offset, then returns * length bytes (defaulting to the rest of the file). -- cgit v1.2.3