diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-25 04:03:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-25 04:03:02 +0000 |
commit | 131824065d58465d03536167290083b2c0ccc1e0 (patch) | |
tree | 2b7156cf3a857c8df2f0da5f1255ace006dc5bb9 /io.c | |
parent | 9ceeedb8745e48d18cfecf1764afc67bf4dc29cd (diff) |
fix some documents.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -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 <em>ios</em>. * @@ -1694,7 +1694,7 @@ rb_io_readline(argc, argv, io) * * Reads all of the lines in <em>ios</em>, and returns them in * <i>anArray</i>. Lines are separated by the optional - * <i>sep_string</i>. If <i>set_string</i> is <code>nil</code>, the + * <i>sep_string</i>. If <i>sep_string</i> is <code>nil</code>, the * rest of the stream is returned as a single record. * The stream must be opened for reading or an * <code>IOError</code> 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 <em>ios</em> 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 <code>IO</code> 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 * <code>File</code> object as a parameter, and the file will be - * automatically closed when the block terminates. The call always - * returns <code>nil</code> in this case. + * automatically closed when the block terminates. The call + * returns the value of the block. * * If <i>path</i> 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 <code>Kernel::gets</code>, 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 - * <code>Kernel.gets(<i>aString</i>)</code> until the end of file. + * <code>Kernel.gets(<i>separator</i>)</code> 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 * <i>length</i> bytes (defaulting to the rest of the file). |