From: "Iñaki Baz Castillo" Date: 2012-05-08T07:21:21+09:00 Subject: How to use Data_Wrap_Struct to assign the DATA VALUE to an exsiting Ruby object? Hi, my code receives an arbitrary klass name (provided by the user) and I need to create an instance of such a klass and also wrap a C pointer within it. Unfortunately Data_Wrap_Struct(VALUE class, void (*mark)(), void (*free)(), void *ptr") requires a class VALUE rather than a single object/instance. So I expect that I *cannot* attach/wrap a C DATA pointer into an *existing* Ruby object and, instead, I need to store the DATA pointer within an internal attribute of the object, am I right? Thanks a lot. -- Iñaki Baz Castillo