aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-09-11 13:15:08 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-04 19:11:30 +0900
commita60dfff43470583bbb4474594efde8607f889e8b (patch)
treee94caa4fde021650be118293ae6c582d7f07a4f7 /ext
parentcf582aa6ee9d8326f930799a4045979a924ffa5e (diff)
downloadruby-a60dfff43470583bbb4474594efde8607f889e8b.tar.gz
[ruby/zlib] Document that gets can return nil when eof? returns false
This behavior differs from File#gets. Fixes [Bug #13904] https://github.com/ruby/zlib/commit/448e41efdd
Diffstat (limited to 'ext')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index c8b206f95e..c540d4c5a1 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -4229,6 +4229,8 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj)
* Document-method: Zlib::GzipReader#gets
*
* See Zlib::GzipReader documentation for a description.
+ * However, note that this method can return +nil+ even if
+ * #eof? returns false, unlike the behavior of File#gets.
*/
static VALUE
rb_gzreader_gets(int argc, VALUE *argv, VALUE obj)