> >Any ideas for writing the typemap for strings in ruby or is
> >there any reference material for swig and ruby on typemaps?
>
> %typemap(ruby,out) string, const string & {
>      $target = rb_str_new2($source->c_str());
> };
>

.... and for completeness' sake,

%typemap(ruby, in) string, const string & {
    Check_Type($source, T_STRING);
    $target = new string(STR2CSTR($source));
}

%typemap(ruby, freearg) string, const string & {
    delete $source;
}