C api, getting class

Hello Florian,

>> This does not work. I have no idea how to proceed. Some small hints
>> would probably enough to point me in the right direction.
I have seen
>> (pickaxe) that I can define the class in the c part with
>> rb_define_class(), but I want to reuse the class that is already
>> defined on the ruby side.
>
> Use rb_path2class("Myclass::UnknownFormat").

This is exactly what I was looking for; seems somewhat undocumented.

Without having a chance of testing right now, I would say
rb_define_class
is just perfect. (Re)opening a class in ruby is legal and should work
from
c also.

cheers

Simon

ยทยทยท

> On 2006-02-08 20:43:21 +0900, Patrick Gundlach wrote: