Passing C++ objects to embedded Ruby with SWIG
Posted by Nat Tuck
SWIG does an excellent job wrapping C++ classes for use as a Ruby extension module. Unfortunately, it doesn’t look to be designed to handle some of the issues that I’ve run into when embedding Ruby to extend a C++ application. Specifically, how to pass C++ objects to Ruby calls in such a way that they can be passed back to SWIG generated methods requires a bit of hackery.
