diff --git a/ext/bzip2/common.h b/ext/bzip2/common.h index 5a99b75..e14da94 100644 --- a/ext/bzip2/common.h +++ b/ext/bzip2/common.h @@ -6,7 +6,7 @@ #ifndef RUBY_19_COMPATIBILITY # include -# include +//# include #else # include #endif diff --git a/ext/bzip2/writer.c b/ext/bzip2/writer.c index 6c999ea..44b5cd4 100644 --- a/ext/bzip2/writer.c +++ b/ext/bzip2/writer.c @@ -163,7 +163,12 @@ VALUE bz_writer_close(VALUE obj) { res = bz_writer_internal_close(bzf); #ifndef RUBINIUS if (!NIL_P(res) && (bzf->flags & BZ2_RB_INTERNAL)) { +#ifdef RBASIC_CLASS + RBASIC_SET_CLASS(res, rb_cString); +#endif +#ifndef RBASIC_CLASS RBASIC(res)->klass = rb_cString; +#endif } #endif return res;