From 26134a6dc13f8cd6af6692ae53d440d7ea9deb13 Mon Sep 17 00:00:00 2001 From: marcandre Date: Mon, 17 May 2010 21:50:00 +0000 Subject: * array.c: Documentation: change => in call-seq to ->. Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * hash.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 442 +++++++++++++++++++++++++++++++++---------------------------------- 1 file changed, 221 insertions(+), 221 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 9d8d6445f8..a3d9512aed 100644 --- a/io.c +++ b/io.c @@ -312,19 +312,19 @@ rb_io_get_write_io(VALUE io) /* * call-seq: - * IO.try_convert(obj) -> io or nil + * IO.try_convert(obj) -> io or nil * * Try to convert obj into an IO, using to_io method. * Returns converted IO or nil if obj cannot be converted * for any reason. * - * IO.try_convert(STDOUT) # => STDOUT - * IO.try_convert("STDOUT") # => nil + * IO.try_convert(STDOUT) #=> STDOUT + * IO.try_convert("STDOUT") #=> nil * * require 'zlib' - * f = open("/tmp/zz.gz") # => # - * z = Zlib::GzipReader.open(f) # => # - * IO.try_convert(z) # => # + * f = open("/tmp/zz.gz") #=> # + * z = Zlib::GzipReader.open(f) #=> # + * IO.try_convert(z) #=> # * */ static VALUE @@ -970,7 +970,7 @@ io_write(VALUE io, VALUE str, int nosync) /* * call-seq: - * ios.write(string) => integer + * ios.write(string) -> integer * * Writes the given string to ios. The stream must be opened * for writing. If the argument is not a string, it will be converted @@ -1000,7 +1000,7 @@ rb_io_write(VALUE io, VALUE str) /* * call-seq: - * ios << obj => ios + * ios << obj -> ios * * String Output---Writes obj to ios. * obj will be converted to a string using @@ -1023,7 +1023,7 @@ rb_io_addstr(VALUE io, VALUE str) /* * call-seq: - * ios.flush => ios + * ios.flush -> ios * * Flushes any buffered data within ios to the underlying * operating system (note that this is Ruby internal buffering only; @@ -1065,8 +1065,8 @@ rb_io_flush(VALUE io) /* * call-seq: - * ios.pos => integer - * ios.tell => integer + * ios.pos -> integer + * ios.tell -> integer * * Returns the current offset (in bytes) of ios. * @@ -1105,7 +1105,7 @@ rb_io_seek(VALUE io, VALUE offset, int whence) /* * call-seq: - * ios.seek(amount, whence=IO::SEEK_SET) -> 0 + * ios.seek(amount, whence=IO::SEEK_SET) -> 0 * * Seeks to a given offset anInteger in the stream according to * the value of whence: @@ -1139,7 +1139,7 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.pos = integer => integer + * ios.pos = integer -> integer * * Seeks to the given position (in bytes) in ios. * @@ -1166,7 +1166,7 @@ static void clear_readconv(rb_io_t *fptr); /* * call-seq: - * ios.rewind => 0 + * ios.rewind -> 0 * * Positions ios to the beginning of input, resetting * lineno to zero. @@ -1234,8 +1234,8 @@ io_fillbuf(rb_io_t *fptr) /* * call-seq: - * ios.eof => true or false - * ios.eof? => true or false + * ios.eof -> true or false + * ios.eof? -> true or false * * Returns true if ios is at end of file that means * there are no more data to read. @@ -1285,7 +1285,7 @@ rb_io_eof(VALUE io) /* * call-seq: - * ios.sync => true or false + * ios.sync -> true or false * * Returns the current ``sync mode'' of ios. When sync mode is * true, all output is immediately flushed to the underlying operating @@ -1308,7 +1308,7 @@ rb_io_sync(VALUE io) /* * call-seq: - * ios.sync = boolean => boolean + * ios.sync = boolean -> boolean * * Sets the ``sync mode'' to true or false. * When sync mode is true, all output is immediately flushed to the @@ -1340,7 +1340,7 @@ rb_io_set_sync(VALUE io, VALUE sync) #ifdef HAVE_FSYNC /* * call-seq: - * ios.fsync => 0 or nil + * ios.fsync -> 0 or nil * * Immediately writes all buffered data in ios to disk. * Note that fsync differs from @@ -1373,7 +1373,7 @@ rb_io_fsync(VALUE io) #ifdef HAVE_FDATASYNC /* * call-seq: - * ios.fdatasync => 0 or nil + * ios.fdatasync -> 0 or nil * * Immediately writes all buffered data in ios to disk. * @@ -1401,8 +1401,8 @@ rb_io_fdatasync(VALUE io) /* * call-seq: - * ios.fileno => fixnum - * ios.to_i => fixnum + * ios.fileno -> fixnum + * ios.to_i -> fixnum * * Returns an integer representing the numeric file descriptor for * ios. @@ -1425,7 +1425,7 @@ rb_io_fileno(VALUE io) /* * call-seq: - * ios.pid => fixnum + * ios.pid -> fixnum * * Returns the process ID of a child process associated with * ios. This will be set by IO.popen. @@ -1457,7 +1457,7 @@ rb_io_pid(VALUE io) /* * call-seq: - * ios.inspect => string + * ios.inspect -> string * * Return a string describing this IO object. */ @@ -1495,7 +1495,7 @@ rb_io_inspect(VALUE obj) /* * call-seq: - * ios.to_io -> ios + * ios.to_io -> ios * * Returns ios. */ @@ -1884,8 +1884,8 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int nonblock) /* * call-seq: - * ios.readpartial(maxlen) => string - * ios.readpartial(maxlen, outbuf) => outbuf + * ios.readpartial(maxlen) -> string + * ios.readpartial(maxlen, outbuf) -> outbuf * * Reads at most maxlen bytes from the I/O stream. * It blocks only if ios has no data immediately available. @@ -1953,8 +1953,8 @@ io_readpartial(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.read_nonblock(maxlen) => string - * ios.read_nonblock(maxlen, outbuf) => outbuf + * ios.read_nonblock(maxlen) -> string + * ios.read_nonblock(maxlen, outbuf) -> outbuf * * Reads at most maxlen bytes from ios using * the read(2) system call after O_NONBLOCK is set for @@ -2014,7 +2014,7 @@ io_read_nonblock(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.write_nonblock(string) => integer + * ios.write_nonblock(string) -> integer * * Writes the given string to ios using * the write(2) system call after O_NONBLOCK is set for @@ -2096,7 +2096,7 @@ rb_io_write_nonblock(VALUE io, VALUE str) /* * call-seq: - * ios.read([length [, buffer]]) => string, buffer, or nil + * ios.read([length [, buffer]]) -> string, buffer, or nil * * Reads length bytes from the I/O stream. * @@ -2554,9 +2554,9 @@ rb_io_gets(VALUE io) /* * call-seq: - * ios.gets(sep=$/) => string or nil - * ios.gets(limit) => string or nil - * ios.gets(sep, limit) => string or nil + * ios.gets(sep=$/) -> string or nil + * ios.gets(limit) -> string or nil + * ios.gets(sep, limit) -> string or nil * * Reads the next ``line'' from the I/O stream; lines are separated by * sep. A separator of nil reads the entire @@ -2586,7 +2586,7 @@ rb_io_gets_m(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.lineno => integer + * ios.lineno -> integer * * Returns the current line number in ios. The stream must be * opened for reading. lineno counts the number of times @@ -2615,7 +2615,7 @@ rb_io_lineno(VALUE io) /* * call-seq: - * ios.lineno = integer => integer + * ios.lineno = integer -> integer * * Manually sets the current line number to the given value. * $. is updated only on the next read. @@ -2643,9 +2643,9 @@ rb_io_set_lineno(VALUE io, VALUE lineno) /* * call-seq: - * ios.readline(sep=$/) => string - * ios.readline(limit) => string - * ios.readline(sep, limit) => string + * ios.readline(sep=$/) -> string + * ios.readline(limit) -> string + * ios.readline(sep, limit) -> string * * Reads a line as with IO#gets, but raises an * EOFError on end of file. @@ -2664,9 +2664,9 @@ rb_io_readline(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.readlines(sep=$/) => array - * ios.readlines(limit) => array - * ios.readlines(sep, limit) => array + * ios.readlines(sep=$/) -> array + * ios.readlines(limit) -> array + * ios.readlines(sep, limit) -> array * * Reads all of the lines in ios, and returns them in * anArray. Lines are separated by the optional sep. If @@ -2696,20 +2696,20 @@ rb_io_readlines(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.each(sep=$/) {|line| block } => ios - * ios.each(limit) {|line| block } => ios - * ios.each(sep,limit) {|line| block } => ios - * ios.each(...) => an_enumerator + * ios.each(sep=$/) {|line| block } -> ios + * ios.each(limit) {|line| block } -> ios + * ios.each(sep,limit) {|line| block } -> ios + * ios.each(...) -> an_enumerator * - * ios.each_line(sep=$/) {|line| block } => ios - * ios.each_line(limit) {|line| block } => ios - * ios.each_line(sep,limit) {|line| block } => ios - * ios.each_line(...) => an_enumerator + * ios.each_line(sep=$/) {|line| block } -> ios + * ios.each_line(limit) {|line| block } -> ios + * ios.each_line(sep,limit) {|line| block } -> ios + * ios.each_line(...) -> an_enumerator * - * ios.lines(sep=$/) {|line| block } => ios - * ios.lines(limit) {|line| block } => ios - * ios.lines(sep,limit) {|line| block } => ios - * ios.lines(...) => an_enumerator + * ios.lines(sep=$/) {|line| block } -> ios + * ios.lines(limit) {|line| block } -> ios + * ios.lines(sep,limit) {|line| block } -> ios + * ios.lines(...) -> an_enumerator * * Executes the block for every line in ios, where lines are * separated by sep. ios must be opened for @@ -2744,11 +2744,11 @@ rb_io_each_line(int argc, VALUE *argv, VALUE io) /* * call-seq: - * ios.bytes {|byte| block } => ios - * ios.bytes => an_enumerator + * ios.bytes {|byte| block } -> ios + * ios.bytes -> an_enumerator * - * ios.each_byte {|byte| block } => ios - * ios.each_byte => an_enumerator + * ios.each_byte {|byte| block } -> ios + * ios.each_byte -> an_enumerator * * Calls the given block once for each byte (0..255) in ios, * passing the byte as an argument. The stream must be opened for @@ -2893,11 +2893,11 @@ io_getc(rb_io_t *fptr, rb_encoding *enc) /* * call-seq: - * ios.chars {|c| block } => ios - * ios.chars => an_enumerator + * ios.chars {|c| block } -> ios + * ios.chars -> an_enumerator * - * ios.each_char {|c| block } => ios - * ios.each_char => an_enumerator + * ios.each_char {|c| block } -> ios + * ios.each_char -> an_enumerator * * Calls the given block once for each character in ios, * passing the character as an argument. The stream must be opened for @@ -2931,10 +2931,10 @@ rb_io_each_char(VALUE io) /* * call-seq: - * ios.each_codepoint {|c| block } => ios - * ios.codepoints {|c| block } => ios - * ios.each_codepoint => an_enumerator - * ios.codepoints => an_enumerator + * ios.each_codepoint {|c| block } -> ios + * ios.codepoints {|c| block } -> ios + * ios.each_codepoint -> an_enumerator + * ios.codepoints -> an_enumerator * * Passes the Integer ordinal of each character in ios, * passing the codepoint as an argument. The stream must be opened for @@ -3027,7 +3027,7 @@ rb_io_each_codepoint(VALUE io) /* * call-seq: - * ios.getc => string or nil + * ios.getc -> string or nil * * Reads a one-character string from ios. Returns * nil if called at end of file. @@ -3053,7 +3053,7 @@ rb_io_getc(VALUE io) /* * call-seq: - * ios.readchar => string + * ios.readchar -> string * * Reads a one-character string from ios. Raises an * EOFError on end of file. @@ -3076,7 +3076,7 @@ rb_io_readchar(VALUE io) /* * call-seq: - * ios.getbyte => fixnum or nil + * ios.getbyte -> fixnum or nil * * Gets the next 8-bit byte (0..255) from ios. Returns * nil if called at end of file. @@ -3113,7 +3113,7 @@ rb_io_getbyte(VALUE io) /* * call-seq: - * ios.readbyte => fixnum + * ios.readbyte -> fixnum * * Reads a byte as with IO#getbyte, but raises an * EOFError on end of file. @@ -3132,8 +3132,8 @@ rb_io_readbyte(VALUE io) /* * call-seq: - * ios.ungetbyte(string) => nil - * ios.ungetbyte(integer) => nil + * ios.ungetbyte(string) -> nil + * ios.ungetbyte(integer) -> nil * * Pushes back bytes (passed as a parameter) onto ios, * such that a subsequent buffered read will return it. Only one byte @@ -3169,7 +3169,7 @@ rb_io_ungetbyte(VALUE io, VALUE b) /* * call-seq: - * ios.ungetc(string) => nil + * ios.ungetc(string) -> nil * * Pushes back one character (passed as a parameter) onto ios, * such that a subsequent buffered character read will return it. Only one character @@ -3230,8 +3230,8 @@ rb_io_ungetc(VALUE io, VALUE c) /* * call-seq: - * ios.isatty => true or false - * ios.tty? => true or false + * ios.isatty -> true or false + * ios.tty? -> true or false * * Returns true if ios is associated with a * terminal device (tty), false otherwise. @@ -3254,7 +3254,7 @@ rb_io_isatty(VALUE io) #if defined(HAVE_FCNTL) && defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC) /* * call-seq: - * ios.close_on_exec? => true or false + * ios.close_on_exec? -> true or false * * Returns true if ios will be closed on exec. * @@ -3296,7 +3296,7 @@ rb_io_close_on_exec_p(VALUE io) #if defined(HAVE_FCNTL) && defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC) /* * call-seq: - * ios.close_on_exec = bool => true or false + * ios.close_on_exec = bool -> true or false * * Sets a close-on-exec flag. * @@ -3582,7 +3582,7 @@ rb_io_close(VALUE io) /* * call-seq: - * ios.close => nil + * ios.close -> nil * * Closes ios and flushes any pending writes to the operating * system. The stream is unavailable for any further data operations; @@ -3619,7 +3619,7 @@ io_close(VALUE io) /* * call-seq: - * ios.closed? => true or false + * ios.closed? -> true or false * * Returns true if ios is completely closed (for * duplex streams, both reader and writer), false @@ -3658,7 +3658,7 @@ rb_io_closed(VALUE io) /* * call-seq: - * ios.close_read => nil + * ios.close_read -> nil * * Closes the read end of a duplex I/O stream (i.e., one that contains * both a read and a write stream, such as a pipe). Will raise an @@ -3715,7 +3715,7 @@ rb_io_close_read(VALUE io) /* * call-seq: - * ios.close_write => nil + * ios.close_write -> nil * * Closes the write end of a duplex I/O stream (i.e., one that contains * both a read and a write stream, such as a pipe). Will raise an @@ -3770,7 +3770,7 @@ rb_io_close_write(VALUE io) /* * call-seq: - * ios.sysseek(offset, whence=IO::SEEK_SET) => integer + * ios.sysseek(offset, whence=IO::SEEK_SET) -> integer * * Seeks to a given offset in the stream according to the value * of whence (see IO#seek for values of @@ -3810,7 +3810,7 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE 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 @@ -3851,7 +3851,7 @@ rb_io_syswrite(VALUE io, VALUE str) /* * call-seq: - * ios.sysread(integer[, outbuf]) => string + * ios.sysread(integer[, outbuf]) -> string * * Reads integer bytes from ios using a low-level * read and returns them as a string. Do not mix with other methods @@ -3957,7 +3957,7 @@ rb_io_ascii8bit_binmode(VALUE io) /* * call-seq: - * ios.binmode => ios + * ios.binmode -> ios * * Puts ios into binary mode. * Once a stream is in binary mode, it cannot be reset to nonbinary mode. @@ -3983,7 +3983,7 @@ rb_io_binmode_m(VALUE io) /* * call-seq: - * ios.binmode? => true or false + * ios.binmode? -> true or false * * Returns true if ios is binmode. */ @@ -5217,8 +5217,8 @@ pop_last_hash(int *argc_p, VALUE *argv) /* * call-seq: - * IO.popen(cmd, mode="r" [, opt]) => io - * IO.popen(cmd, mode="r" [, opt]) {|io| block } => obj + * IO.popen(cmd, mode="r" [, opt]) -> io + * IO.popen(cmd, mode="r" [, opt]) {|io| block } -> obj * * Runs the specified command as a subprocess; the subprocess's * standard input and output will be connected to the returned @@ -5388,10 +5388,10 @@ rb_open_file(int argc, VALUE *argv, VALUE io) * Document-method: File::open * * call-seq: - * File.open(filename, mode="r" [, opt]) => file - * File.open(filename [, mode [, perm]] [, opt]) => file - * File.open(filename, mode="r" [, opt]) {|file| block } => obj - * File.open(filename [, mode [, perm]] [, opt]) {|file| block } => obj + * File.open(filename, mode="r" [, opt]) -> file + * File.open(filename [, mode [, perm]] [, opt]) -> file + * File.open(filename, mode="r" [, opt]) {|file| block } -> obj + * File.open(filename [, mode [, perm]] [, opt]) {|file| block } -> obj * * With no associated block, open is a synonym for * File.new. If the optional code block is given, it will @@ -5404,8 +5404,8 @@ rb_open_file(int argc, VALUE *argv, VALUE io) * Document-method: IO::open * * call-seq: - * IO.open(fd, mode_string="r" [, opt] ) => io - * IO.open(fd, mode_string="r" [, opt] ) {|io| block } => obj + * IO.open(fd, mode_string="r" [, opt] ) -> io + * IO.open(fd, mode_string="r" [, opt] ) {|io| block } -> obj * * With no associated block, open is a synonym for * IO.new. If the optional code block is given, it will @@ -5429,7 +5429,7 @@ rb_io_s_open(int argc, VALUE *argv, VALUE klass) /* * call-seq: - * IO.sysopen(path, [mode, [perm]]) => fixnum + * IO.sysopen(path, [mode, [perm]]) -> fixnum * * Opens the given path, returning the underlying file descriptor as a * Fixnum. @@ -5483,8 +5483,8 @@ check_pipe_command(VALUE filename_or_command) /* * call-seq: - * open(path [, mode_enc [, perm]] [, opt] ) => io or nil - * open(path [, mode_enc [, perm]] [, opt] ) {|io| block } => obj + * open(path [, mode_enc [, perm]] [, opt] ) -> io or nil + * open(path [, mode_enc [, perm]] [, opt] ) {|io| block } -> obj * * Creates an IO object connected to the given stream, * file, or subprocess. @@ -5748,8 +5748,8 @@ io_reopen(VALUE io, VALUE nfile) /* * call-seq: - * ios.reopen(other_IO) => ios - * ios.reopen(path, mode_str) => ios + * ios.reopen(other_IO) -> ios + * ios.reopen(path, mode_str) -> ios * * Reassociates ios with the I/O stream given in * other_IO or to a new stream opened on path. This may @@ -5884,7 +5884,7 @@ rb_io_init_copy(VALUE dest, VALUE io) /* * call-seq: - * ios.printf(format_string [, obj, ...] ) => nil + * ios.printf(format_string [, obj, ...] ) -> nil * * Formats and writes to ios, converting parameters under * control of the format string. See Kernel#sprintf @@ -5900,8 +5900,8 @@ rb_io_printf(int argc, VALUE *argv, VALUE out) /* * call-seq: - * printf(io, string [, obj ... ] ) => nil - * printf(string [, obj ... ] ) => nil + * printf(io, string [, obj ... ] ) -> nil + * printf(string [, obj ... ] ) -> nil * * Equivalent to: * io.write(sprintf(string, obj, ...) @@ -5930,8 +5930,8 @@ rb_f_printf(int argc, VALUE *argv) /* * call-seq: - * ios.print() => nil - * ios.print(obj, ...) => nil + * ios.print() -> nil + * ios.print(obj, ...) -> nil * * Writes the given object(s) to ios. The stream must be * opened for writing. If the output field separator ($,) @@ -5977,7 +5977,7 @@ rb_io_print(int argc, VALUE *argv, VALUE out) /* * call-seq: - * print(obj, ...) => nil + * print(obj, ...) -> nil * * Prints each object in turn to $stdout. If the output * field separator ($,) is not +nil+, its @@ -6007,7 +6007,7 @@ rb_f_print(int argc, VALUE *argv) /* * call-seq: - * ios.putc(obj) => obj + * ios.putc(obj) -> obj * * If obj is Numeric, write the character whose * code is obj, otherwise write the first character of the @@ -6032,7 +6032,7 @@ rb_io_putc(VALUE io, VALUE ch) /* * call-seq: - * putc(int) => int + * putc(int) -> int * * Equivalent to: * @@ -6068,7 +6068,7 @@ io_puts_ary(VALUE ary, VALUE out, int recur) /* * call-seq: - * ios.puts(obj, ...) => nil + * ios.puts(obj, ...) -> nil * * Writes the given objects to ios as with * IO#print. Writes a record separator (typically a @@ -6121,7 +6121,7 @@ rb_io_puts(int argc, VALUE *argv, VALUE out) /* * call-seq: - * puts(obj, ...) => nil + * puts(obj, ...) -> nil * * Equivalent to * @@ -6154,9 +6154,9 @@ rb_p(VALUE obj) /* for debug print within C code */ /* * call-seq: - * p(obj) => obj - * p(obj1, obj2, ...) => [obj, ...] - * p() => nil + * p(obj) -> obj + * p(obj1, obj2, ...) -> [obj, ...] + * p() -> nil * * For each object, directly writes * _obj_.+inspect+ followed by the current output @@ -6194,7 +6194,7 @@ rb_f_p(int argc, VALUE *argv, VALUE self) /* * call-seq: - * obj.display(port=$>) => nil + * obj.display(port=$>) -> nil * * Prints obj on the given port (default $>). * Equivalent to: @@ -6319,7 +6319,7 @@ rb_io_stdio_file(rb_io_t *fptr) /* * call-seq: - * IO.new(fd [, mode] [, opt]) => io + * IO.new(fd [, mode] [, opt]) -> io * * Returns a new IO object (a stream) for the given * IO object or integer file descriptor and mode @@ -6463,8 +6463,8 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io) /* * call-seq: - * File.new(filename, mode="r" [, opt]) => file - * File.new(filename [, mode [, perm]] [, opt]) => file + * File.new(filename, mode="r" [, opt]) -> file + * File.new(filename [, mode [, perm]] [, opt]) -> file * * Opens the file named by _filename_ according to * _mode_ (default is ``r'') and returns a new @@ -6524,7 +6524,7 @@ rb_io_s_new(int argc, VALUE *argv, VALUE klass) /* * call-seq: - * IO.for_fd(fd, mode [, opt]) => io + * IO.for_fd(fd, mode [, opt]) -> io * * Synonym for IO.new. * @@ -6540,7 +6540,7 @@ rb_io_s_for_fd(int argc, VALUE *argv, VALUE klass) /* * call-seq: - * ios.autoclose? => true or false + * ios.autoclose? -> true or false * * Returns +true+ if the underlying file descriptor of _ios_ will be * closed automatically at its finalization, otherwise +false+. @@ -6557,7 +6557,7 @@ rb_io_autoclose_p(VALUE io) /* * call-seq: - * io.autoclose = bool => true or false + * io.autoclose = bool -> true or false * * Sets auto-close flag. * @@ -6650,7 +6650,7 @@ argf_initialize_copy(VALUE argf, VALUE orig) /* * call-seq: - * ARGF.lineno = number => nil + * ARGF.lineno = number -> nil * * Sets the line number of the current file in +ARGF+ to the given +Integer+. * @@ -6676,7 +6676,7 @@ argf_set_lineno(VALUE argf, VALUE val) /* * call-seq: - * ARGF.lineno => Integer + * ARGF.lineno -> integer * * Returns the current line number of the current file in +ARGF+. This value * can be set manually with +ARGF.lineno=+. @@ -6897,9 +6897,9 @@ static VALUE argf_gets(int, VALUE *, VALUE); /* * call-seq: - * gets(sep=$/) => string or nil - * gets(limit) => string or nil - * gets(sep,limit) => string or nil + * gets(sep=$/) -> string or nil + * gets(limit) -> string or nil + * gets(sep,limit) -> string or nil * * Returns (and assigns to $_) the next line from the list * of files in +ARGV+ (or $*), or from standard input if @@ -6939,9 +6939,9 @@ rb_f_gets(int argc, VALUE *argv, VALUE recv) /* * call-seq: - * ARGF.gets(sep=$/) => String - * ARGF.gets(limit) => String - * ARGF.gets(sep, limit) => String + * ARGF.gets(sep=$/) -> string + * ARGF.gets(limit) -> string + * ARGF.gets(sep, limit) -> string * * Returns the next line from the current file in +ARGF+. * @@ -6993,9 +6993,9 @@ static VALUE argf_readline(int, VALUE *, VALUE); /* * call-seq: - * readline(sep=$/) => string - * readline(limit) => string - * readline(sep, limit) => string + * readline(sep=$/) -> string + * readline(limit) -> string + * readline(sep, limit) -> string * * Equivalent to Kernel::gets, except * +readline+ raises +EOFError+ at end of file. @@ -7013,9 +7013,9 @@ rb_f_readline(int argc, VALUE *argv, VALUE recv) /* * call-seq: - * ARGF.readline(sep=$/) => String - * ARGF.readline(limit) => String - * ARGF.readline(sep, limit) => String + * ARGF.readline(sep=$/) -> string + * ARGF.readline(limit) -> string + * ARGF.readline(sep, limit) -> string * * Returns the next line from the current file in +ARGF+. * @@ -7046,9 +7046,9 @@ static VALUE argf_readlines(int, VALUE *, VALUE); /* * call-seq: - * readlines(sep=$/) => array - * readlines(limit) => array - * readlines(sep,limit) => array + * readlines(sep=$/) -> array + * readlines(limit) -> array + * readlines(sep,limit) -> array * * Returns an array containing the lines returned by calling * Kernel.gets(sep) until the end of file. @@ -7065,13 +7065,13 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv) /* * call-seq: - * ARGF.readlines(sep=$/) => Array - * ARGF.readlines(limit) => Array - * ARGF.readlines(sep, limit) => Array + * ARGF.readlines(sep=$/) -> array + * ARGF.readlines(limit) -> array + * ARGF.readlines(sep, limit) -> array * - * ARGF.to_a(sep=$/) => Array - * ARGF.to_a(limit) => Array - * ARGF.to_a(sep, limit) => Array + * ARGF.to_a(sep=$/) -> array + * ARGF.to_a(limit) -> array + * ARGF.to_a(sep, limit) -> array * * Reads +ARGF+'s current file in its entirety, returning an +Array+ of its * lines, one line per element. Lines are assumed to be separated by _sep_. @@ -7094,7 +7094,7 @@ argf_readlines(int argc, VALUE *argv, VALUE argf) /* * call-seq: - * `cmd` => string + * `cmd` -> string * * Returns the standard output of running _cmd_ in a subshell. * The built-in syntax %x{...} uses @@ -7288,7 +7288,7 @@ select_end(VALUE arg) * IO.select(read_array * [, write_array * [, error_array - * [, timeout]]] ) => array or nil + * [, timeout]]] )-> array or nil * * See Kernel#select. */ @@ -7420,7 +7420,7 @@ rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p) /* * call-seq: - * ios.ioctl(integer_cmd, arg) => integer + * ios.ioctl(integer_cmd, arg) -> integer * * Provides a mechanism for issuing low-level commands to control or * query I/O devices. Arguments and results are platform dependent. If @@ -7442,7 +7442,7 @@ rb_io_ioctl(int argc, VALUE *argv, VALUE io) #ifdef HAVE_FCNTL /* * call-seq: - * ios.fcntl(integer_cmd, arg) => integer + * ios.fcntl(integer_cmd, arg) -> integer * * Provides a mechanism for issuing low-level commands to control or * query file-oriented I/O streams. Arguments and results are platform @@ -7468,7 +7468,7 @@ rb_io_fcntl(int argc, VALUE *argv, VALUE io) #if defined(HAVE_SYSCALL) && SIZEOF_LONG == SIZEOF_INT /* * call-seq: - * syscall(fixnum [, args...]) => integer + * syscall(fixnum [, args...]) -> integer * * Calls the operating system function identified by _fixnum_, * passing in the arguments, which must be either +String+ @@ -7655,10 +7655,10 @@ pipe_pair_close(VALUE rw) /* * call-seq: - * IO.pipe -> [read_io, write_io] - * IO.pipe(ext_enc) -> [read_io, write_io] - * IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io] - * IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io] + * IO.pipe -> [read_io, write_io] + * IO.pipe(ext_enc) -> [read_io, write_io] + * IO.pipe("ext_enc:int_enc" [, opt]) -> [read_io, write_io] + * IO.pipe(ext_enc, int_enc [, opt]) -> [read_io, write_io] * * IO.pipe(...) {|read_io, write_io| ... } * @@ -7822,10 +7822,10 @@ io_s_foreach(struct foreach_arg *arg) /* * call-seq: - * IO.foreach(name, sep=$/ [, open_args]) {|line| block } => nil - * IO.foreach(name, limit [, open_args]) {|line| block } => nil - * IO.foreach(name, sep, limit [, open_args]) {|line| block } => nil - * IO.foreach(...) => an_enumerator + * IO.foreach(name, sep=$/ [, open_args]) {|line| block } -> nil + * IO.foreach(name, limit [, open_args]) {|line| block } -> nil + * IO.foreach(name, sep, limit [, open_args]) {|line| block } -> nil + * IO.foreach(...) -> an_enumerator * * Executes the block for every line in the named I/O port, where lines * are separated by sep. @@ -7866,9 +7866,9 @@ io_s_readlines(struct foreach_arg *arg) /* * call-seq: - * IO.readlines(name, sep=$/ [, open_args]) => array - * IO.readlines(name, limit [, open_args]) => array - * IO.readlines(name, sep, limit [, open_args]) => array + * IO.readlines(name, sep=$/ [, open_args]) -> array + * IO.readlines(name, limit [, open_args]) -> array + * IO.readlines(name, sep, limit [, open_args]) -> array * * Reads the entire file specified by name as individual * lines, and returns those lines in an array. Lines are separated by @@ -7915,8 +7915,8 @@ seek_before_access(VALUE argp) /* * call-seq: - * IO.read(name, [length [, offset]] ) => string - * IO.read(name, [length [, offset]], open_args) => string + * IO.read(name, [length [, offset]] ) -> string + * IO.read(name, [length [, offset]], open_args) -> string * * Opens the file, optionally seeks to the given offset, then returns * length bytes (defaulting to the rest of the file). @@ -7972,7 +7972,7 @@ rb_io_s_read(int argc, VALUE *argv, VALUE io) /* * call-seq: - * IO.binread(name, [length [, offset]] ) => string + * IO.binread(name, [length [, offset]] ) -> string * * Opens the file, optionally seeks to the given offset, then returns * length bytes (defaulting to the rest of the file). @@ -8561,7 +8561,7 @@ rb_io_s_copy_stream(int argc, VALUE *argv, VALUE io) /* * call-seq: - * io.external_encoding => encoding + * io.external_encoding -> encoding * * Returns the Encoding object that represents the encoding of the file. * If io is write mode and no encoding is specified, returns nil. @@ -8586,7 +8586,7 @@ rb_io_external_encoding(VALUE io) /* * call-seq: - * io.internal_encoding => encoding + * io.internal_encoding -> encoding * * Returns the Encoding of the internal string if conversion is * specified. Otherwise returns nil. @@ -8604,11 +8604,11 @@ rb_io_internal_encoding(VALUE io) /* * call-seq: - * io.set_encoding(ext_enc) => io - * io.set_encoding("ext_enc:int_enc") => io - * io.set_encoding(ext_enc, int_enc) => io - * io.set_encoding("ext_enc:int_enc", opt) => io - * io.set_encoding(ext_enc, int_enc, opt) => io + * io.set_encoding(ext_enc) -> io + * io.set_encoding("ext_enc:int_enc") -> io + * io.set_encoding(ext_enc, int_enc) -> io + * io.set_encoding("ext_enc:int_enc", opt) -> io + * io.set_encoding(ext_enc, int_enc, opt) -> io * * If single argument is specified, read string from io is tagged * with the encoding specified. If encoding is a colon separated two @@ -8647,7 +8647,7 @@ rb_stdio_set_default_encoding(void) /* * call-seq: - * ARGF.external_encoding => encoding + * ARGF.external_encoding -> encoding * * Returns the external encoding for files read from +ARGF+ as an +Encoding+ * object. The external encoding is the encoding of the text as stored in a @@ -8672,7 +8672,7 @@ argf_external_encoding(VALUE argf) /* * call-seq: - * ARGF.internal_encoding => encoding + * ARGF.internal_encoding -> encoding * * Returns the internal encoding for strings read from +ARGF+ as an * +Encoding+ object. @@ -8694,11 +8694,11 @@ argf_internal_encoding(VALUE argf) /* * call-seq: - * ARGF.set_encoding(ext_enc) => ARGF - * ARGF.set_encoding("ext_enc:int_enc") => ARGF - * ARGF.set_encoding(ext_enc, int_enc) => ARGF - * ARGF.set_encoding("ext_enc:int_enc", opt) => ARGF - * ARGF.set_encoding(ext_enc, int_enc, opt) => ARGF + * ARGF.set_encoding(ext_enc) -> ARGF + * ARGF.set_encoding("ext_enc:int_enc") -> ARGF + * ARGF.set_encoding(ext_enc, int_enc) -> ARGF + * ARGF.set_encoding("ext_enc:int_enc", opt) -> ARGF + * ARGF.set_encoding(ext_enc, int_enc, opt) -> ARGF * * If single argument is specified, strings read from ARGF are tagged with * the encoding specified. @@ -8739,8 +8739,8 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf) /* * call-seq: - * ARGF.tell => Integer - * ARGF.pos => Integer + * ARGF.tell -> Integer + * ARGF.pos -> Integer * * Returns the current offset (in bytes) of the current file in +ARGF+. * @@ -8761,7 +8761,7 @@ argf_tell(VALUE argf) /* * call-seq: - * ARGF.seek(amount, whence=IO::SEEK_SET) -> 0 + * ARGF.seek(amount, whence=IO::SEEK_SET) -> 0 * * Seeks to offset _amount_ (an +Integer+) in the +ARGF+ stream according to * the value of _whence_. See +IO#seek+ for further details. @@ -8778,7 +8778,7 @@ argf_seek_m(int argc, VALUE *argv, VALUE argf) /* * call-seq: - * ARGF.pos = position => Integer + * ARGF.pos = position -> Integer * * Seeks to the position given by _position_ (in bytes) in +ARGF+. * @@ -8799,7 +8799,7 @@ argf_set_pos(VALUE argf, VALUE offset) /* * call-seq: - * ARGF.rewind => 0 + * ARGF.rewind -> 0 * * Positions the current file to the beginning of input, resetting * +ARGF.lineno+ to zero. @@ -8821,8 +8821,8 @@ argf_rewind(VALUE argf) /* * call-seq: - * ARGF.fileno => fixnum - * ARGF.to_i => fixnum + * ARGF.fileno -> fixnum + * ARGF.to_i -> fixnum * * Returns an integer representing the numeric file descriptor for * the current file. Raises an +ArgumentError+ if there isn't a current file. @@ -8841,7 +8841,7 @@ argf_fileno(VALUE argf) /* * call-seq: - * ARGF.to_io => IO + * ARGF.to_io -> IO * * Returns an +IO+ object representing the current file. This will be a * +File+ object unless the current file is a stream such as STDIN. @@ -8861,8 +8861,8 @@ argf_to_io(VALUE argf) /* * call-seq: - * ARGF.eof? => true or false - * ARGF.eof => true or false + * ARGF.eof? -> true or false + * ARGF.eof -> true or false * * Returns true if the current file in +ARGF+ is at end of file, i.e. it has * no data to read. The stream must be opened for reading or an +IOError+ @@ -8894,7 +8894,7 @@ argf_eof(VALUE argf) /* * call-seq: - * ARGF.read([length [, buffer]]) => string, buffer, or nil + * ARGF.read([length [, buffer]]) -> string, buffer, or nil * * Reads _length_ bytes from ARGF. The files named on the command line * are concatenated and treated as a single file by this method, so when @@ -8990,8 +8990,8 @@ argf_forward_call(VALUE arg) /* * call-seq: - * ARGF.readpartial(maxlen) => string - * ARGF.readpartial(maxlen, outbuf) => outbuf + * ARGF.readpartial(maxlen) -> string + * ARGF.readpartial(maxlen, outbuf) -> outbuf * * Reads at most _maxlen_ bytes from the ARGF stream. It blocks only if * +ARGF+ has no data immediately available. If the optional _outbuf_ @@ -9059,7 +9059,7 @@ argf_readpartial(int argc, VALUE *argv, VALUE argf) /* * call-seq: - * ARGF.getc => String or nil + * ARGF.getc -> String or nil * * Reads the next character from +ARGF+ and returns it as a +String+. Returns * +nil+ at the end of the stream. @@ -9104,7 +9104,7 @@ argf_getc(VALUE argf) /* * call-seq: - * ARGF.getbyte => Fixnum or nil + * ARGF.getbyte -> Fixnum or nil * * Gets the next 8-bit byte (0..255) from +ARGF+. Returns +nil+ if called at * the end of the stream. @@ -9144,7 +9144,7 @@ argf_getbyte(VALUE argf) /* * call-seq: - * ARGF.readchar => String or nil + * ARGF.readchar -> String or nil * * Reads the next character from +ARGF+ and returns it as a +String+. Raises * an +EOFError+ after the last character of the last file has been read. @@ -9184,7 +9184,7 @@ argf_readchar(VALUE argf) /* * call-seq: - * ARGF.readbyte => Fixnum + * ARGF.readbyte -> Fixnum * * Reads the next 8-bit byte from ARGF and returns it as a +Fixnum+. Raises * an +EOFError+ after the last byte of the last file has been read. @@ -9215,17 +9215,17 @@ argf_readbyte(VALUE argf) /* * call-seq: - * ARGF.each(sep=$/) {|line| block } => ARGF - * ARGF.each(sep=$/,limit) {|line| block } => ARGF - * ARGF.each(...) => an_enumerator + * ARGF.each(sep=$/) {|line| block } -> ARGF + * ARGF.each(sep=$/,limit) {|line| block } -> ARGF + * ARGF.each(...) -> an_enumerator * - * ARGF.each_line(sep=$/) {|line| block } => ARGF - * ARGF.each_line(sep=$/,limit) {|line| block } => ARGF - * ARGF.each_line(...) => an_enumerator + * ARGF.each_line(sep=$/) {|line| block } -> ARGF + * ARGF.each_line(sep=$/,limit) {|line| block } -> ARGF + * ARGF.each_line(...) -> an_enumerator * - * ARGF.lines(sep=$/) {|line| block } => ARGF - * ARGF.lines(sep=$/,limit) {|line| block } => ARGF - * ARGF.lines(...) => an_enumerator + * ARGF.lines(sep=$/) {|line| block } -> ARGF + * ARGF.lines(sep=$/,limit) {|line| block } -> ARGF + * ARGF.lines(...) -> an_enumerator * * Returns an enumerator which iterates over each line (separated by _sep_, * which defaults to your platform's newline character) of each file in @@ -9262,11 +9262,11 @@ argf_each_line(int argc, VALUE *argv, VALUE argf) /* * call-seq: - * ARGF.bytes {|byte| block } => ARGF - * ARGF.bytes => an_enumerator + * ARGF.bytes {|byte| block } -> ARGF + * ARGF.bytes -> an_enumerator * - * ARGF.each_byte {|byte| block } => ARGF - * ARGF.each_byte => an_enumerator + * ARGF.each_byte {|byte| block } -> ARGF + * ARGF.each_byte -> an_enumerator * * Iterates over each byte of each file in +ARGV+. * A byte is returned as a +Fixnum+ in the range 0..255. @@ -9297,11 +9297,11 @@ argf_each_byte(VALUE argf) /* * call-seq: - * ARGF.chars {|char| block } => ARGF - * ARGF.chars => an_enumerator + * ARGF.chars {|char| block } -> ARGF + * ARGF.chars -> an_enumerator * - * ARGF.each_char {|char| block } => ARGF - * ARGF.each_char => an_enumerator + * ARGF.each_char {|char| block } -> ARGF + * ARGF.each_char -> an_enumerator * * Iterates over each character of each file in +ARGF+. * @@ -9327,8 +9327,8 @@ argf_each_char(VALUE argf) /* * call-seq: - * ARGF.filename => String - * ARGF.path => String + * ARGF.filename -> String + * ARGF.path -> String * * Returns the current filename. "-" is returned when the current file is * STDIN. @@ -9362,7 +9362,7 @@ argf_filename_getter(ID id, VALUE *var) /* * call-seq: - * ARGF.file => IO or File object + * ARGF.file -> IO or File object * * Returns the current file as an +IO+ or +File+ object. #> is * returned when the current file is STDIN. @@ -9387,7 +9387,7 @@ argf_file(VALUE argf) /* * call-seq: - * ARGF.binmode => ARGF + * ARGF.binmode -> ARGF * * Puts +ARGF+ into binary mode. Once a stream is in binary mode, it cannot * be reset to non-binary mode. This option has the following effects: @@ -9408,7 +9408,7 @@ argf_binmode_m(VALUE argf) /* * call-seq: - * ARGF.binmode? => true or false + * ARGF.binmode? -> true or false * * Returns true if +ARGF+ is being read in binary mode; false otherwise. (To * enable binary mode use +ARGF.binmode+. @@ -9427,7 +9427,7 @@ argf_binmode_p(VALUE argf) /* * call-seq: - * ARGF.skip => ARGF + * ARGF.skip -> ARGF * * Sets the current file to the next file in ARGV. If there aren't any more * files it has no effect. @@ -9451,7 +9451,7 @@ argf_skip(VALUE argf) /* * call-seq: - * ARGF.close => ARGF + * ARGF.close -> ARGF * * Closes the current file and skips to the next in the stream. Trying to * close a file that has already been closed causes an +IOError+ to be @@ -9481,7 +9481,7 @@ argf_close_m(VALUE argf) /* * call-seq: - * ARGF.closed? => true or false + * ARGF.closed? -> true or false * * Returns _true_ if the current file has been closed; _false_ otherwise. Use * +ARGF.close+ to actually close the current file. @@ -9496,7 +9496,7 @@ argf_closed(VALUE argf) /* * call-seq: - * ARGF.to_s => String + * ARGF.to_s -> String * * Returns "ARGF". */ @@ -9508,7 +9508,7 @@ argf_to_s(VALUE argf) /* * call-seq: - * ARGF.inplace_mode => String + * ARGF.inplace_mode -> String * * Returns the file extension appended to the names of modified files under * inplace-edit mode. This value can be set using +ARGF.inplace_mode=+ or @@ -9529,7 +9529,7 @@ opt_i_get(ID id, VALUE *var) /* * call-seq: - * ARGF.inplace_mode = ext => ARGF + * ARGF.inplace_mode = ext -> ARGF * * Sets the filename extension for inplace editing mode to the given String. * Each file being edited has this value appended to its filename. The @@ -9585,7 +9585,7 @@ ruby_set_inplace_mode(const char *suffix) /* * call-seq: - * ARGF.argv => ARGV + * ARGF.argv -> ARGV * * Returns the +ARGV+ array, which contains the arguments passed to your * script, one per element. -- cgit v1.2.3