From ecd469fad00611a947aecc6e1e914682d1eec65c Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Sat, 5 Feb 2022 14:25:22 -0500 Subject: [DOC] Fix links in documentation for File and IO Fixes some typos and dead links. --- file.c | 2 +- io.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/file.c b/file.c index aa8c422ea7..0d0b9d59db 100644 --- a/file.c +++ b/file.c @@ -6523,7 +6523,7 @@ const char ruby_null_device[] = * * Note that file permissions are quite different from the _mode_ * of a file stream (\File object). - * See {IO Modes}[#class-IO-label-Modes]. + * See {IO Modes}[rdoc-ref:IO@Modes]. * * In a \File object, the permissions are available thus, * where method +mode+, despite its name, returns permissions: diff --git a/io.c b/io.c index 1a2f9c8e8d..08a17aa02b 100644 --- a/io.c +++ b/io.c @@ -9068,19 +9068,19 @@ rb_io_set_encoding_by_bom(VALUE io) * File.new('t.txt') * * Optional argument +mode+ (defaults to 'r') must specify a valid mode - * see {\IO Modes}[#class-IO-label-Modes]: + * see {\IO Modes}[rdoc-ref:IO@Modes]: * * File.new('t.tmp', 'w') * File.new('t.tmp', File::RDONLY) * * Optional argument +perm+ (defaults to 0666) must specify valid permissions - * see {File Permissions}[#class-File-label-Permissions]: + * see {File Permissions}[rdoc-ref:IO@File+Permissions]: * * File.new('t.tmp', File::CREAT, 0644) * File.new('t.tmp', File::CREAT, 0444) * * Optional argument +open_opts+ must specify valid open options - * see {IO Open Options}[#class-IO-label-Open+Options]: + * see {IO Open Options}[rdoc-ref:IO@Open+Options]: * * File.new('t.tmp', autoclose: true) * File.new('t.tmp', internal_encoding: nil) @@ -14238,7 +14238,7 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y) * - Kernel#readlines * - IO.foreach * - IO.readlines - * - IO#eachline + * - IO#each_line * - IO#gets * - IO#readline * - IO#readlines -- cgit v1.2.3