summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 08:36:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 08:36:46 +0000
commit9d835e1258010306a8cf19898dbb90b6826b4c28 (patch)
tree63e3c3a02457640466320791edac1a0b5cc19e42 /io.c
parent4ed6e04490a689556f7f9a6c74f3256c00d5f67c (diff)
downloadruby-9d835e1258010306a8cf19898dbb90b6826b4c28.tar.gz
ruby-9d835e1258010306a8cf19898dbb90b6826b4c28.tar.xz
ruby-9d835e1258010306a8cf19898dbb90b6826b4c28.zip
* include/ruby/intern.h (rb_io_ungetbyte): added prototype.
* io.c (rb_io_gets): use rb_io_getline_1 for unget buffer. * ruby.c (load_file): use rb_io_ungetbyte. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 9e919c075..6ca2f71f5 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);
}
/*