From 121648473d4001ee3125afb0ca05f94cca3e7916 Mon Sep 17 00:00:00 2001 From: akira Date: Thu, 28 Oct 2004 14:40:08 +0000 Subject: * ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if z->input isn't nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 44a9f3ea7b..6dfb4cb4b6 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -638,7 +638,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; return dst; } -- cgit v1.2.3