From: pere.noel@... (=?ISO-8859-1?Q?Une_b=E9vue?=) Date: 2006-08-09T02:25:07+09:00 Subject: FOUND was (Re: Init_xxx(with arg ??) in C for ruby ext ???) Une b�vue wrote: > ew to C, i'm writing a ruby ext, i wonder if we could pass an arg to > Init_xxx(type * arg) ??? > > this is to have a constructor in ruby like that : > > trick=MyClass.new("my arg") > > and if not does exists a workaround ??? it is : rb_define_singleton_method(rb_cMyClass, "new", cd_new, 1); -- une b�vue