summaryrefslogtreecommitdiff
path: root/ext/-test-/integer/my_integer.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/integer/my_integer.c')
-rw-r--r--ext/-test-/integer/my_integer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/-test-/integer/my_integer.c b/ext/-test-/integer/my_integer.c
new file mode 100644
index 00000000000..d86474bd7df
--- /dev/null
+++ b/ext/-test-/integer/my_integer.c
@@ -0,0 +1,16 @@
+#include "ruby.h"
+
+static VALUE
+my_integer_s_new(VALUE klass)
+{
+ return Data_Wrap_Struct(klass, 0, 0, 0);
+}
+
+void
+Init_my_integer(VALUE klass)
+{
+ VALUE cMyInteger;
+
+ cMyInteger = rb_define_class_under(klass, "MyInteger", rb_cInteger);
+ rb_define_singleton_method(cMyInteger, "new", my_integer_s_new, 0);
+}