Dave Thomas <Dave / PragmaticProgrammer.com> wrote:
> Not being a SWIG pro, this has me slightly puzzled.
> 
> If I have:
> 
>      class Dave
>      {
>      public:
>        Dave(int i);
>        %name(Fred) Dave(char *c);
>      }

> 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?

You forget nothing.  I forgot to consider constructor renaming.
This should be fixed.

in the meantime you can avoid the bug by:

     class Dave
     {
     public:
       Dave(int i);
       %addmethods {
         static Dave *Fred(char *c) { return new Dave(c); };
       }
     }


Masaki Fukushima