Thank you Garth for your answer.
I figured out the problem with segfault. It was caused by shared 
parametr in make file.
I will try to embeded Ruby in C.
So your opinion is that Data_Wrap_Struct should work also for nested 
structs? Do you have any experience with it?

-- 
Posted via http://www.ruby-forum.com/.