ruby-changes:11730
From: akr <ko1@a...>
Date: Sat, 9 May 2009 14:44:29 +0900 (JST)
Subject: [ruby-changes:11730] Ruby:r23376 (trunk): rename argument name.
akr 2009-05-09 14:44:20 +0900 (Sat, 09 May 2009) New Revision: 23376 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23376 Log: rename argument name. Modified files: trunk/array.c Index: array.c =================================================================== --- array.c (revision 23375) +++ array.c (revision 23376) @@ -303,21 +303,21 @@ } static VALUE -ary_new(VALUE klass, long len) +ary_new(VALUE klass, long capa) { VALUE ary; - if (len < 0) { + if (capa < 0) { rb_raise(rb_eArgError, "negative array size (or size too big)"); } - if (len > ARY_MAX_SIZE) { + if (capa > ARY_MAX_SIZE) { rb_raise(rb_eArgError, "array size too big"); } ary = ary_alloc(klass); - if (len > RARRAY_EMBED_LEN_MAX) { + if (capa > RARRAY_EMBED_LEN_MAX) { FL_UNSET_EMBED(ary); - ARY_SET_PTR(ary, ALLOC_N(VALUE, len)); - ARY_SET_CAPA(ary, len); + ARY_SET_PTR(ary, ALLOC_N(VALUE, capa)); + ARY_SET_CAPA(ary, capa); ARY_SET_HEAP_LEN(ary, 0); } @@ -325,9 +325,9 @@ } VALUE -rb_ary_new2(long len) +rb_ary_new2(long capa) { - return ary_new(rb_cArray, len); + return ary_new(rb_cArray, capa); } @@ -373,9 +373,9 @@ } VALUE -rb_ary_tmp_new(long len) +rb_ary_tmp_new(long capa) { - return ary_new(0, len); + return ary_new(0, capa); } void -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/