Method: Zlib::GzipReader#eof?

Defined in:
zlib.c

#eof?Boolean

Returns true or false whether the stream has reached the end.

Returns:

  • (Boolean)


3576
3577
3578
3579
3580
3581
3582
3583
3584
# File 'zlib.c', line 3576

static VALUE
rb_gzfile_eof_p(VALUE obj)
{
    struct gzfile *gz = get_gzfile(obj);
    while (!ZSTREAM_IS_FINISHED(&gz->z) && ZSTREAM_BUF_FILLED(&gz->z) == 0) {
	gzfile_read_more(gz, Qnil);
    }
    return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
}