From 428661eccfbfe7e73c4c0b0e97db0a4a6603cb4a Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 16 Sep 2008 09:29:40 +0000 Subject: * io.c (rb_io_gets_m): rdoc updated. limit counts in bytes. [ruby-core:18617] * io.c (rb_io_readlines, rb_f_gets): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ io.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 701ae510b5..b7dea226f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Sep 16 18:28:52 2008 Yukihiro Matsumoto + + * io.c (rb_io_gets_m): rdoc updated. limit counts in bytes. + [ruby-core:18617] + + * io.c (rb_io_readlines, rb_f_gets): ditto. + Tue Sep 16 11:55:16 2008 Yukihiro Matsumoto * string.c (rb_str_each_codepoint): add new methods, #codepoints diff --git a/io.c b/io.c index ba1d08cd59..56745aa685 100644 --- a/io.c +++ b/io.c @@ -2257,7 +2257,7 @@ rb_io_gets(VALUE io) * to $_. Returns nil if called at end of * file. If the first argument is an integer, or optional second * argument is given, the returning string would not be longer than the - * given value. + * given value in bytes. * * File.new("testfile").gets #=> "This is line one\n" * $_ #=> "This is line one\n" @@ -2363,8 +2363,8 @@ rb_io_readline(int argc, VALUE *argv, VALUE io) * sep is nil, the rest of the stream is returned * as a single record. If the first argument is an integer, or * optional second argument is given, the returning string would not be - * longer than the given value. The stream must be opened for reading - * or an IOError will be raised. + * longer than the given value in bytes. The stream must be opened for + * reading or an IOError will be raised. * * f = File.new("testfile") * f.readlines[0] #=> "This is line one\n" @@ -5994,9 +5994,9 @@ static VALUE argf_gets(int, VALUE *, VALUE); * reads the input one paragraph at a time, where paragraphs are * divided by two consecutive newlines. If the first argument is an * integer, or optional second argument is given, the returning string - * would not be longer than the given value. If multiple filenames are - * present in +ARGV+, +gets(nil)+ will read the contents one file at a - * time. + * would not be longer than the given value in bytes. If multiple + * filenames are present in +ARGV+, +gets(nil)+ will read the contents + * one file at a time. * * ARGV << "testfile" * print while gets -- cgit v1.2.3