On Tue, Mar 25, 2003 at 05:21:05AM +0900, David King Landrith wrote:
> This much I understand.   This is a complicated topic, and it looks 
> like what I wrote before was rather convoluted.  If anyone is able to 
> restate what I'm trying to ask in a more straightforward manner, I'd 
> appreciate it.
> 
> I am wondering if there is anything special that I must do to create a 
> method that instantiates a new MyArray object in c.  All of the 
> examples of "new" methods (meaning a methods that are declared using 
> the form rb_define_singleton_method(myClass, "new", myClass_new, argc) 
> simply extend rb_cObj.

If you're trying to do something very deep, which involves fudging with the
implementation of Array itself, rather than just adding methods to Array,
then I'm out of my depth :-)

It does seem to me that whatever you write is going to be heavily tied to
the particular implementation of Array which exists now, and therefore may
not be very portable. Without knowing what you're trying to achieve, would
be it be worth using 'has_a' instead of 'is_a'? That is, create a new object
which in turn contains an instance of an Array? You can then mechanically
delegate to it.

Regards,

Brian.