From 4ded52b623ebd1b3de12db82f8b54cc156c1fd28 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 7 Apr 2004 02:51:05 +0000 Subject: * file.c (rb_get_path): get path string via "to_path" method if path object is not a string. [Ruby2] * gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the exit finalizers. * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index db2ba0d296..7aafbbdc77 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1757,6 +1757,7 @@ gzfile_close(gz, closeflag) int closeflag; { VALUE io = gz->io; + gz->end(gz); gz->io = Qnil; gz->orig_name = Qnil; @@ -2157,6 +2158,7 @@ gzfile_writer_end(gz) gzfile_make_footer(gz); if (ZSTREAM_IS_FINALIZE(&gz->z)) { + if (NIL_P(gz->io)) return; rb_warn("Zlib::GzipWriter object must be closed explicitly."); if (OBJ_IS_FREED(gz->io)) { aborted = 1; -- cgit v1.2.3