I\'d like to organize the C source code like this: + / ___ + ext ___ + native_extension ___ + lib
I\'m trying to write a C extension to ruby that\'ll generate a class. I\'m looking on how to define some default arguments to a class. For example, if I have this class decleration in ruby:
I have implemented Ruby C extension(i.e. Invoking C function from ruby script) Following is the function implemented in c from file \"cFile.c\"
HI i have following code in c which is invoked from a ruby script, static VALUE myMethod(VALUE self, VALUE exc)
I\'m having some issues where when if I run this C extension outside of a Rails environment it works, but when I run inside Rails it gives me a stack dump.
Right now I have a series of objects that are created using C extensions, so say they are Foo Bar Baz.
I created a C extension, the purpose of which is to determine if a series of cards will result in a straight or not.The example might be a little more complicated than necessary to show the issue, but
This is my stripped down code which isolates my problem: #include \"ruby.h\" #include \"stdlib.h\" typedef struct HandValues {
This method is just verifying that I\'m able to see the elements of a ruby array correctly. static VALUE
I\'m building a simple C extension for a Ruby module, and I\'m running into trouble with a segfault when I call another C function inside my extension. The basic flow of execution goes like this: