diff options
| author | akira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-28 14:40:08 +0000 |
|---|---|---|
| committer | akira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-28 14:40:08 +0000 |
| commit | 8e13b72e54f2542e5846e7ab1afed2ec2c2b9c14 (patch) | |
| tree | 3999bed5be60e32d9eb6dd35e30fbb13359e3142 | |
| parent | 40e1f225500adbfcaa22a2a7daad727c074d6721 (diff) | |
| download | ruby-8e13b72e54f2542e5846e7ab1afed2ec2c2b9c14.tar.gz ruby-8e13b72e54f2542e5846e7ab1afed2ec2c2b9c14.tar.xz ruby-8e13b72e54f2542e5846e7ab1afed2ec2c2b9c14.zip | |
* ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if
z->input isn't nil.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/zlib/zlib.c | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Oct 28 23:32:54 2004 akira yamada <akira@ruby-lang.org> + + * ext/zlib/zlib.c (zstream_detach_input): resets klass of z->input if + z->input isn't nil. + Thu Oct 28 23:19:31 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/extmk.rb: prefer relative path. [ruby-talk:93037] diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 44a9f3ea7..6dfb4cb4b 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; } |
