From a60dfff43470583bbb4474594efde8607f889e8b Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 11 Sep 2020 13:15:08 -0700 Subject: [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 --- ext/zlib/zlib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/zlib') 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) -- cgit v1.2.3