[前][次][番号順一覧][スレッド一覧]

ruby-changes:72715

From: Nobuyoshi <ko1@a...>
Date: Thu, 28 Jul 2022 09:03:01 +0900 (JST)
Subject: [ruby-changes:72715] 431fdc9200 (master): [DOC] Cross references for `ARGF`

https://git.ruby-lang.org/ruby.git/commit/?id=431fdc9200

From 431fdc9200ce28fcd10efb96fda869bb874fb2d0 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 28 Jul 2022 09:02:23 +0900
Subject: [DOC] Cross references for `ARGF`

---
 io.c | 122 +++++++++++++++++++++++++++++++++----------------------------------
 1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/io.c b/io.c
index d90ff62660..1fe9278957 100644
--- a/io.c
+++ b/io.c
@@ -9571,11 +9571,11 @@ argf_initialize_copy(VALUE argf, VALUE orig) https://github.com/ruby/ruby/blob/trunk/io.c#L9571
  *  call-seq:
  *     ARGF.lineno = integer  -> integer
  *
- *  Sets the line number of +ARGF+ as a whole to the given +Integer+.
+ *  Sets the line number of ARGF as a whole to the given Integer.
  *
- *  +ARGF+ sets the line number automatically as you read data, so normally
+ *  ARGF sets the line number automatically as you read data, so normally
  *  you will not need to set it explicitly. To access the current line number
- *  use +ARGF.lineno+.
+ *  use ARGF.lineno.
  *
  *  For example:
  *
@@ -9598,7 +9598,7 @@ argf_set_lineno(VALUE argf, VALUE val) https://github.com/ruby/ruby/blob/trunk/io.c#L9598
  *     ARGF.lineno  -> integer
  *
  *  Returns the current line number of ARGF as a whole. This value
- *  can be set manually with +ARGF.lineno=+.
+ *  can be set manually with ARGF.lineno=.
  *
  *  For example:
  *
@@ -9923,10 +9923,10 @@ rb_f_gets(int argc, VALUE *argv, VALUE recv) https://github.com/ruby/ruby/blob/trunk/io.c#L9923
  *     ARGF.gets(limit [, getline_args])      -> string or nil
  *     ARGF.gets(sep, limit [, getline_args]) -> string or nil
  *
- *  Returns the next line from the current file in +ARGF+.
+ *  Returns the next line from the current file in ARGF.
  *
  *  By default lines are assumed to be separated by <code>$/</code>;
- *  to use a different character as a separator, supply it as a +String+
+ *  to use a different character as a separator, supply it as a String
  *  for the _sep_ argument.
  *
  *  The optional _limit_ argument specifies how many characters of each line
@@ -10005,16 +10005,16 @@ rb_f_readline(int argc, VALUE *argv, VALUE recv) https://github.com/ruby/ruby/blob/trunk/io.c#L10005
  *     ARGF.readline(limit)      -> string
  *     ARGF.readline(sep, limit) -> string
  *
- *  Returns the next line from the current file in +ARGF+.
+ *  Returns the next line from the current file in ARGF.
  *
  *  By default lines are assumed to be separated by <code>$/</code>;
- *  to use a different character as a separator, supply it as a +String+
+ *  to use a different character as a separator, supply it as a String
  *  for the _sep_ argument.
  *
  *  The optional _limit_ argument specifies how many characters of each line
  *  to return. By default all characters are returned.
  *
- *  An +EOFError+ is raised at the end of the file.
+ *  An EOFError is raised at the end of the file.
  */
 static VALUE
 argf_readline(int argc, VALUE *argv, VALUE argf)
@@ -10111,7 +10111,7 @@ rb_f_readlines(int argc, VALUE *argv, VALUE recv) https://github.com/ruby/ruby/blob/trunk/io.c#L10111
  *     ARGF.to_a(limit)      -> array
  *     ARGF.to_a(sep, limit) -> array
  *
- *  Reads each file in +ARGF+ in its entirety, returning an +Array+ containing
+ *  Reads each file in ARGF in its entirety, returning an Array containing
  *  lines from the files. Lines are assumed to be separated by _sep_.
  *
  *     lines = ARGF.readlines
@@ -13126,12 +13126,12 @@ global_argf_p(VALUE arg) https://github.com/ruby/ruby/blob/trunk/io.c#L13126
  *  call-seq:
  *     ARGF.external_encoding   -> encoding
  *
- *  Returns the external encoding for files read from +ARGF+ as an +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
- *  file. Contrast with +ARGF.internal_encoding+, which is the encoding used
- *  to represent this text within Ruby.
+ *  file. Contrast with ARGF.internal_encoding, which is the encoding used to
+ *  represent this text within Ruby.
  *
- *  To set the external encoding use +ARGF.set_encoding+.
+ *  To set the external encoding use ARGF.set_encoding.
  *
  *  For example:
  *
@@ -13151,10 +13151,10 @@ argf_external_encoding(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13151
  *  call-seq:
  *     ARGF.internal_encoding   -> encoding
  *
- *  Returns the internal encoding for strings read from +ARGF+ as an
- *  +Encoding+ object.
+ *  Returns the internal encoding for strings read from ARGF as an
+ *  Encoding object.
  *
- *  If +ARGF.set_encoding+ has been called with two encoding names, the second
+ *  If ARGF.set_encoding has been called with two encoding names, the second
  *  is returned. Otherwise, if +Encoding.default_external+ has been set, that
  *  value is returned. Failing that, if a default external encoding was
  *  specified on the command-line, that value is used. If the encoding is
@@ -13190,7 +13190,7 @@ argf_internal_encoding(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13190
  *  specifies the internal encoding.
  *
  *  If the external encoding and the internal encoding are specified, the
- *  optional +Hash+ argument can be used to adjust the conversion process. The
+ *  optional Hash argument can be used to adjust the conversion process. The
  *  structure of this hash is explained in the String#encode documentation.
  *
  *  For example:
@@ -13219,7 +13219,7 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13219
  *     ARGF.tell  -> Integer
  *     ARGF.pos   -> Integer
  *
- *  Returns the current offset (in bytes) of the current file in +ARGF+.
+ *  Returns the current offset (in bytes) of the current file in ARGF.
  *
  *     ARGF.pos    #=> 0
  *     ARGF.gets   #=> "This is line one\n"
@@ -13240,7 +13240,7 @@ argf_tell(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13240
  *  call-seq:
  *     ARGF.seek(amount, whence=IO::SEEK_SET)  -> 0
  *
- *  Seeks to offset _amount_ (an +Integer+) in the +ARGF+ stream according to
+ *  Seeks to offset _amount_ (an Integer) in the ARGF stream according to
  *  the value of _whence_. See IO#seek for further details.
  */
 static VALUE
@@ -13257,7 +13257,7 @@ argf_seek_m(int argc, VALUE *argv, VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13257
  *  call-seq:
  *     ARGF.pos = position  -> Integer
  *
- *  Seeks to the position given by _position_ (in bytes) in +ARGF+.
+ *  Seeks to the position given by _position_ (in bytes) in ARGF.
  *
  *  For example:
  *
@@ -13279,7 +13279,7 @@ argf_set_pos(VALUE argf, VALUE offset) https://github.com/ruby/ruby/blob/trunk/io.c#L13279
  *     ARGF.rewind   -> 0
  *
  *  Positions the current file to the beginning of input, resetting
- *  +ARGF.lineno+ to zero.
+ *  ARGF.lineno to zero.
  *
  *     ARGF.readline   #=> "This is line one\n"
  *     ARGF.rewind     #=> 0
@@ -13310,7 +13310,7 @@ argf_rewind(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13310
  *     ARGF.to_i      -> integer
  *
  *  Returns an integer representing the numeric file descriptor for
- *  the current file. Raises an +ArgumentError+ if there isn't a current file.
+ *  the current file. Raises an ArgumentError if there isn't a current file.
  *
  *     ARGF.fileno    #=> 3
  */
@@ -13328,8 +13328,8 @@ argf_fileno(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13328
  *  call-seq:
  *     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.
+ *  Returns an IO object representing the current file. This will be a
+ *  File object unless the current file is a stream such as STDIN.
  *
  *  For example:
  *
@@ -13349,8 +13349,8 @@ argf_to_io(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13349
  *     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+
+ *  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
  *  will be raised.
  *
  *     $ echo "eof" | ruby argf.rb
@@ -13585,10 +13585,10 @@ argf_getpartial(int argc, VALUE *argv, VALUE argf, VALUE opts, int nonblock) https://github.com/ruby/ruby/blob/trunk/io.c#L13585
  *  call-seq:
  *     ARGF.getc  -> String or nil
  *
- *  Reads the next character from +ARGF+ and returns it as a +String+. Returns
+ *  Reads the next character from ARGF and returns it as a String. Returns
  *  +nil+ at the end of the stream.
  *
- *  +ARGF+ treats the files named on the command line as a single file created
+ *  ARGF treats the files named on the command line as a single file created
  *  by concatenating their contents. After returning the last character of the
  *  first file, it returns the first character of the second file, and so on.
  *
@@ -13630,7 +13630,7 @@ argf_getc(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13630
  *  call-seq:
  *     ARGF.getbyte  -> Integer or nil
  *
- *  Gets the next 8-bit byte (0..255) from +ARGF+. Returns +nil+ if called at
+ *  Gets the next 8-bit byte (0..255) from ARGF. Returns +nil+ if called at
  *  the end of the stream.
  *
  *  For example:
@@ -13670,8 +13670,8 @@ argf_getbyte(VALUE argf) https://github.com/ruby/ruby/blob/trunk/io.c#L13670
  *  call-seq:
  *     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.
+ *  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.
  *
  *  For example:
  *
@@ -13710,8 +13710,8 @@ argf_readchar(VA (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]