On Tue, Jan 26, 2010 at 07:10:15AM +0900, Philliam Auriemma wrote: > Hey guys, > I am writing a ruby extension in C++ that exposes a function to ruby, > and then opens a ruby interpreter that loads a file that can call the > function. > > I am following the Pragmatic Programmers guide to embedding and > extending ruby. I have a function defined like this: > > static VALUE Send (VALUE length, VALUE capMode, VALUE dev, VALUE pack) This function needs to take a leading VALUE which holds a reference to the recipient of the call. Try this instead: static VALUE Send (VALUE mod, VALUE length, VALUE capMode, VALUE dev, VALUE pack) -- Aaron Patterson http://tenderlovemaking.com/