From: Tilman Sauerbeck Date: Sun, 1 Apr 2007 14:18:06 +0000 (+0200) Subject: Prefer rb_ary_new4() over rb_ary_new3(). X-Git-Url: http://git.code-monkey.de/?p=ruby-eet.git;a=commitdiff_plain;h=ba5f3a808e0be5854ca448245fe24fcb983e650f Prefer rb_ary_new4() over rb_ary_new3(). --- diff --git a/ext/ext.c b/ext/ext.c index 28bfa4c..ea620be 100644 --- a/ext/ext.c +++ b/ext/ext.c @@ -601,7 +601,7 @@ int_to_eet_chunks (int argc, VALUE *argv, VALUE self) rb_scan_args (argc, argv, "11", &tag, &type); - ary = rb_ary_new3 (1, self); + ary = rb_ary_new4 (1, &self); if (type == sym_char) cfmt = "c"; @@ -614,7 +614,7 @@ int_to_eet_chunks (int argc, VALUE *argv, VALUE self) args[1] = rb_funcall (ary, id_pack, 1, rb_str_new2 (cfmt)); chunk = rb_class_new_instance (2, args, cChunk); - return rb_ary_new3 (1, chunk); + return rb_ary_new4 (1, &chunk); } static VALUE @@ -644,7 +644,7 @@ float_to_eet_chunks (int argc, VALUE *argv, VALUE self) args[1] = rb_str_new (buf, len); chunk = rb_class_new_instance (2, args, cChunk); - return rb_ary_new3 (1, chunk); + return rb_ary_new4 (1, &chunk); } void