From: Brian Candler Date: 2009-08-27T00:01:20+09:00 Subject: Re: Help with C embedding Khat Harr wrote: > VALUE input_trigger(VALUE button) { Try: VALUE input_trigger(VALUE self, VALUE button) { There are some examples you can follow at http://ruby-doc.org/docs/ProgrammingRuby/html/ext_ruby.html Have a look at the first one and compare it to yours: static VALUE t_add(VALUE self, VALUE anObject) { ... } ... rb_define_method(cTest, "add", t_add, 1); > result = Input.trigger?(16) > ======================================== > > It's saying > ======================================== > can't convert Module into Integer > ======================================== > > I don't understand why it expects a Module there. Input is a module, and is the receiver of the method call. -- Posted via http://www.ruby-forum.com/.