/*
- * $Id: ext.c 63 2005-06-09 17:47:46Z tilman $
+ * $Id: ext.c 65 2005-06-28 18:40:59Z tilman $
*
* Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
*
struct RArray *stream;
long i;
- ret = rb_str_new2 ("");
-
stream = RARRAY (self);
if (!stream->len)
- return ret;
+ return rb_str_new2 ("");
+
+ ret = rb_ary_new ();
for (i = 0; i < stream->len; i++) {
VALUE str;
str = rb_funcall (stream->ptr[i], id_serialize, 0, NULL);
- rb_str_append (ret, str);
+ rb_ary_push (ret, str);
}
- return ret;
+ return rb_ary_join (ret, Qnil);
}
static VALUE
StringValue (tag);
StringValue (data);
- if (rb_funcall (tag, id_include, 1, INT2FIX (0)) == Qtrue) \
+ if (rb_funcall (tag, id_include, 1, INT2FIX (0)) == Qtrue)
rb_raise (rb_eArgError, "tag must not contain binary zeroes");
/* libeet uses a signed 32bit integer to store the