diff options
author | Burdette Lamar <[email protected]> | 2024-02-20 15:10:52 -0600 |
---|---|---|
committer | <[email protected]> | 2024-02-20 16:10:52 -0500 |
commit | d4b4b53bc02c7bc12f3cba75c8390a8ab27e9306 () | |
tree | 91bd7149d53c05222b0efca8977b138b129504df | |
parent | b3c13de858d0dbe4e3965485d47da58b6960cb64 (diff) |
[DOC] Fix links in doc (#9970)
-rw-r--r-- | file.c | 12 | ||||
-rw-r--r-- | io.c | 57 |
2 files changed, 39 insertions, 30 deletions
@@ -7665,11 +7665,13 @@ Init_File(void) * * Flag File::BINARY specifies that the stream is to be accessed in binary mode. * - * ==== File::SHARE_DELETE (Windows Only) * * Flag File::SHARE_DELETE enables other processes to open the stream * with delete access. * * If the stream is opened for (local) delete access without File::SHARE_DELETE, * and another process attempts to open it with delete access, * the attempt fails and the stream is not opened for that process. @@ -7744,9 +7746,11 @@ Init_File(void) * do not match the directory separator * (the value of constant File::SEPARATOR). * - * ==== File::FNM_SHORTNAME (Windows Only) * - * Flag File::FNM_SHORTNAME Allows patterns to match short names if they exist. * * ==== File::FNM_SYSCASE * @@ -7799,7 +7803,7 @@ Init_File(void) #ifndef O_SHARE_DELETE # define O_SHARE_DELETE 0 #endif - /* {File::SHARE_DELETE}[rdoc-ref:File::Constants@File-3A-3ASHARE_DELETE+-28Windows+Only-29] */ rb_define_const(rb_mFConst, "SHARE_DELETE", INT2FIX(O_SHARE_DELETE)); #ifdef O_SYNC /* {File::SYNC}[rdoc-ref:File::Constants@File-3A-3ASYNC-2C+File-3A-3ARSYNC-2C+and+File-3A-3ADSYNC] */ @@ -4300,11 +4300,8 @@ rb_io_gets_internal(VALUE io) * File.open('t.txt') {|f| f.gets(12) } # => "First line\n" * * With arguments +sep+ and +limit+ given, - * combines the two behaviors: - * - * - Returns the next line as determined by line separator +sep+, - * or +nil+ if none. - * - But returns no more bytes than are allowed by the limit. * * Optional keyword argument +chomp+ specifies whether line separators * are to be omitted: @@ -4453,10 +4450,8 @@ static VALUE io_readlines(const struct getline_arg *arg, VALUE io); * f.close * * With arguments +sep+ and +limit+ given, - * combines the two behaviors: - * - * - Returns lines as determined by line separator +sep+. - * - But returns no more bytes in a line than are allowed by the limit. * * Optional keyword argument +chomp+ specifies whether line separators * are to be omitted: @@ -4576,10 +4571,8 @@ io_readlines(const struct getline_arg *arg, VALUE io) * "ne\n" * * With arguments +sep+ and +limit+ given, - * combines the two behaviors: - * - * - Calls with the next line as determined by line separator +sep+. - * - But returns no more bytes than are allowed by the limit. * * Optional keyword argument +chomp+ specifies whether line separators * are to be omitted: @@ -10471,8 +10464,9 @@ static VALUE argf_readlines(int, VALUE *, VALUE); * $cat t.txt | ruby -e "p readlines 12" * ["First line\n", "Second line\n", "\n", "Fourth line\n", "Fifth line\n"] * - * With arguments +sep+ and +limit+ given, combines the two behaviors; - * see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]. * * Optional keyword argument +chomp+ specifies whether line separators * are to be omitted: @@ -11983,7 +11977,7 @@ io_s_foreach(VALUE v) * * With argument +limit+ given, parses lines as determined by the default * line separator and the given line-length limit - * (see {Line Limit}[rdoc-ref:IO@Line+Limit]): * * File.foreach('t.txt', 7) {|line| p line } * @@ -11999,10 +11993,9 @@ io_s_foreach(VALUE v) * "Fourth l" * "line\n" * - * With arguments +sep+ and +limit+ given, - * parses lines as determined by the given - * line separator and the given line-length limit - * (see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]): * * Optional keyword arguments +opts+ specify: * @@ -12075,15 +12068,14 @@ io_s_readlines(VALUE v) * * With argument +limit+ given, parses lines as determined by the default * line separator and the given line-length limit - * (see {Line Limit}[rdoc-ref:IO@Line+Limit]): * * IO.readlines('t.txt', 7) * # => ["First l", "ine\n", "Second ", "line\n", "\n", "Third l", "ine\n", "Fourth ", "line\n"] * - * With arguments +sep+ and +limit+ given, - * parses lines as determined by the given - * line separator and the given line-length limit - * (see {Line Separator and Line Limit}[rdoc-ref:IO@Line+Separator+and+Line+Limit]): * * Optional keyword arguments +opts+ specify: * @@ -14864,7 +14856,8 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y) * ["ARGF.read", "Open the pod bay doors, Hal.\n"] * * When no character <tt>'-'</tt> is given, stream <tt>$stdin</tt> is ignored - * (exception: see {Special Case}[rdoc-ref:ARGF@Special+Case]): * * - Command and output: * @@ -15223,6 +15216,18 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y) * File.open('t.rus') {|f| f.gets(3).size } # => 2 * File.open('t.rus') {|f| f.gets(4).size } # => 2 * * ===== Line Number * * A readable \IO stream has a non-negative integer <i>line number</i>: |