Do anyone know about a library capable of generating a printable report?


----- Original Message ----- 
From: "Ian Macdonald" <ian / caliban.org>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Friday, February 25, 2005 12:12 PM
Subject: Purpose of rb_assoc_new()


> Hello,
> 
> I recently took over the maintenance of the Ruby/LDAP library and am
> stuck on interpreting the following line:
> 
>  tmp = rb_assoc_new (op, rb_ary_new ());
> 
> I can't find an explanation of rb_assoc_new() anywhere. It's used all
> over the Ruby source code and yet I still can't figure what's going on.
> 
> I know that rb_ary_new() makes a new array, which is presumably being
> associated with tmp, but what does op have to do with it?
> 
> array.c has the definition:
> 
> VALUE   
> rb_assoc_new(car, cdr)
>     VALUE car, cdr;
> {
>     VALUE ary;
> 
>     ary = rb_ary_new2(2);
>     RARRAY(ary)->ptr[0] = car;
>     RARRAY(ary)->ptr[1] = cdr;
>     RARRAY(ary)->len = 2;
>     
>     return ary;
> }       
> 
> Is this just a convenient way to instantiate a two element array?
> 
> Ian
> -- 
> Ian Macdonald               | He knew the tavernes well in every toun.   
> System Administrator        | -- Geoffrey Chaucer 
> ian / caliban.org             | 
> http://www.caliban.org      | 
>                            | 
> 
> 
> -- 
> Este correo esta libre de virus!
>


-- 
Este correo esta libre de virus!