Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created June 21, 2012 22:01
Show Gist options
  • Save djberg96/2968832 to your computer and use it in GitHub Desktop.
Save djberg96/2968832 to your computer and use it in GitHub Desktop.
RubyInline generated C code
#include "ruby.h"
# line 6 "average.rb"
static VALUE stuff(VALUE self, VALUE _self) {
VALUE self = (_self);
return (INT2FIX(7));
}
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport)
void Init_Inline_Array_c13d88cb4cb02003daedb8a84e5d272a() {
VALUE c = rb_cObject;
c = rb_const_get(c, rb_intern("Array"));
rb_define_method(c, "stuff", (VALUE(*)(ANYARGS))stuff, 1);
}
#ifdef __cplusplus
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment