Object#to_eet: don't put the final chunk in a stream again.
[ruby-eet.git] / ext / ext.c
index c4082dc86b2535fa60b97232778632968e56b17b..22ccb19aef5582dbe94c7c5d2c38760ddf3ce0e8 100644 (file)
--- a/ext/ext.c
+++ b/ext/ext.c
@@ -1,5 +1,5 @@
 /*
- * $Id: ext.c 60 2005-06-08 16:18:32Z tilman $
+ * $Id: ext.c 61 2005-06-09 17:33:48Z tilman $
  *
  * Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -591,9 +591,7 @@ c_to_eet (VALUE self)
        args[1] = rb_funcall (stream, id_serialize, 0);
        chunk = rb_class_new_instance (2, args, cChunk);
 
-       stream = rb_class_new_instance (1, &chunk, cStream);
-
-       return rb_funcall (stream, id_serialize, 0);
+       return rb_funcall (chunk, id_serialize, 0);
 }
 
 static VALUE