From: William Djaja Tjokroaminata Date: 2002-12-10T06:39:55+09:00 Subject: Re: Extension: array size? Mark Probert wrote: > Rubyists, > I know I am missing something obvious here. How do I > find the number of elements in an array from C? In other > words, what is the equivalent of Array#size/length in C? Hi, It is mentioned "informally" on the second page of "Extending Ruby" Chapter in the pickaxe book (p. 172). It is 'RARRAY(arr)->len', which is of type 'long'. (Well, in this case actually we are dealing with the internal structure of RARRAY; just hope that Matz will never change it...) Regards, Bill