aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/io.c b/io.c
index 5bacad14b2..348e001b0d 100644
--- a/io.c
+++ b/io.c
@@ -8385,12 +8385,12 @@ rb_io_autoclose_p(VALUE io)
* f = open("/dev/null")
* IO.for_fd(f.fileno)
* # ...
- * f.gets # may cause IOError
+ * f.gets # may cause Errno::EBADF
*
* f = open("/dev/null")
- * IO.for_fd(f.fileno).autoclose = true
+ * IO.for_fd(f.fileno).autoclose = false
* # ...
- * f.gets # won't cause IOError
+ * f.gets # won't cause Errno::EBADF
*/
static VALUE
@@ -8402,7 +8402,7 @@ rb_io_set_autoclose(VALUE io, VALUE autoclose)
fptr->mode |= FMODE_PREP;
else
fptr->mode &= ~FMODE_PREP;
- return io;
+ return autoclose;
}
static void