summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pathname/pathname.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 2d74e9cf80..d5e58c52d8 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -368,10 +368,10 @@ path_each_line(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
if (rb_block_given_p()) {
- return rb_block_call(rb_cIO, id_foreach, 1+n, args, 0, 0);
+ return rb_block_call(rb_cFile, id_foreach, 1+n, args, 0, 0);
}
else {
- return rb_funcallv(rb_cIO, id_foreach, 1+n, args);
+ return rb_funcallv(rb_cFile, id_foreach, 1+n, args);
}
}
@@ -382,7 +382,7 @@ path_each_line(int argc, VALUE *argv, VALUE self)
*
* Returns all data from the file, or the first +N+ bytes if specified.
*
- * See IO.read.
+ * See File.read.
*
*/
static VALUE
@@ -393,7 +393,7 @@ path_read(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcallv(rb_cIO, id_read, 1+n, args);
+ return rb_funcallv(rb_cFile, id_read, 1+n, args);
}
/*
@@ -402,7 +402,7 @@ path_read(int argc, VALUE *argv, VALUE self)
*
* Returns all the bytes from the file, or the first +N+ if specified.
*
- * See IO.binread.
+ * See File.binread.
*
*/
static VALUE
@@ -413,7 +413,7 @@ path_binread(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "02", &args[1], &args[2]);
- return rb_funcallv(rb_cIO, id_binread, 1+n, args);
+ return rb_funcallv(rb_cFile, id_binread, 1+n, args);
}
/*
@@ -423,7 +423,7 @@ path_binread(int argc, VALUE *argv, VALUE self)
*
* Writes +contents+ to the file.
*
- * See IO.write.
+ * See File.write.
*
*/
static VALUE
@@ -434,7 +434,7 @@ path_write(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcallv(rb_cIO, id_write, 1+n, args);
+ return rb_funcallv(rb_cFile, id_write, 1+n, args);
}
/*
@@ -444,7 +444,7 @@ path_write(int argc, VALUE *argv, VALUE self)
*
* Writes +contents+ to the file, opening it in binary mode.
*
- * See IO.binwrite.
+ * See File.binwrite.
*
*/
static VALUE
@@ -455,7 +455,7 @@ path_binwrite(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcallv(rb_cIO, id_binwrite, 1+n, args);
+ return rb_funcallv(rb_cFile, id_binwrite, 1+n, args);
}
/*
@@ -466,7 +466,7 @@ path_binwrite(int argc, VALUE *argv, VALUE self)
*
* Returns all the lines from the file.
*
- * See IO.readlines.
+ * See File.readlines.
*
*/
static VALUE
@@ -477,7 +477,7 @@ path_readlines(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcallv(rb_cIO, id_readlines, 1+n, args);
+ return rb_funcallv(rb_cFile, id_readlines, 1+n, args);
}
/*