From: Dave Thomas Date: 2001-01-02T14:56:34+09:00 Subject: [ruby-talk:8495] Question about Swig and Ruby Not being a SWIG pro, this has me slightly puzzled. If I have: class Dave { public: Dave(int i); %name(Fred) Dave(char *c); } Then swig -ruby correctly generates: static VALUE _wrap_new_Dave(VALUE self, VALUE varg0) { int arg0 ; Dave *result ; VALUE vresult = Qnil; arg0 = NUM2INT(varg0); result = (Dave *)new Dave(arg0); vresult = Wrap_Dave(self, result); return vresult; } static VALUE _wrap_new_Fred(VALUE self, VALUE varg0) { char *arg0 ; Dave *result ; VALUE vresult = Qnil; arg0 = STR2CSTR(varg0); result = (Dave *)new Dave(arg0); vresult = Wrap_Dave(self, result); return vresult; } but seems to forget to create the Ruby definition for the renamed method: cDave = rb_define_class_under(mDave, "Dave", rb_cObject); rb_define_singleton_method(cDave, "new", VALUEFUNC(_wrap_new_Dave), 1); What am I forgetting to do? Thanks Dave