From: Tobias Peters Date: 2003-04-19T20:15:43+09:00 Subject: Re: [Q] "dynamic_cast" with Ruby and Swig Lyle Johnson wrote: > Yura wrote: >> Can anyone tell me if this is the best way to do "dynamic_cast" with >> Swig-wrapped Ruby extension module: [...] > > This is probably more clear: > > %extend Base { > Derived *toDerived() { return dynamic_cast(self); } > } Any Chance that swig could perform a cast to the most derived type automatically? Tobias