Thankyou verymuch.

regards,
salai.

 puts [1,2,3,[4,99],5,7].number_of_leaves #--> 7

On Mon, Oct 26, 2009 at 1:21 PM, Aldric Giacomoni <aldric / trevoke.net> wrote:
> Robert Klemme wrote:
>> 2009/10/26 salai <sayakyi / gmail.com>:
>>> Dear Rubyist,
>>>
>>> I want to count array list [1,2,3,[4],5] ---> # 5 leaves
>
> Out of sheer curiosity.. [1,2,3,[4],5].size # --> 5
> Not what you need?
> --
> Posted via http://www.ruby-forum.com/.
>
>