summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/io.c b/io.c
index 9e919c0759..6ca2f71f59 100644
--- a/io.c
+++ b/io.c
@@ -2213,11 +2213,7 @@ rb_io_getline(int argc, VALUE *argv, VALUE io)
VALUE
rb_io_gets(VALUE io)
{
- rb_io_t *fptr;
-
- GetOpenFile(io, fptr);
- rb_io_check_readable(fptr);
- return rb_io_getline_fast(fptr, io_read_encoding(fptr));
+ return rb_io_getline_1(rb_default_rs, -1, io);
}
/*