From b0dee8f90d4ffe30cff0047df263b6098ffaed51 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 29 Oct 2004 01:06:37 +0000 Subject: * eval.c (ruby_cleanup): ruby_finalize_1 may cause exception, should be wrapped by PUSH_TAG/POP_TAG(). [ruby-dev:24627] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ext/zlib/zlib.c') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 21bcfbcff8..db3b6c8ed6 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -640,7 +640,13 @@ zstream_detach_input(z) { VALUE dst; - dst = NIL_P(z->input) ? rb_str_new(0, 0) : z->input; + if (NIL_P(z->input)) { + dst = rb_str_new(0, 0); + } + else { + dst = z->input; + RBASIC(dst)->klass = rb_cString; + } z->input = Qnil; RBASIC(dst)->klass = rb_cString; return dst; -- cgit v1.2.3