summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/struct/len.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/-test-/struct/len.c b/ext/-test-/struct/len.c
new file mode 100644
index 0000000..6153c72
--- /dev/null
+++ b/ext/-test-/struct/len.c
@@ -0,0 +1,13 @@
+#include "ruby.h"
+
+static VALUE
+bug_struct_len(VALUE obj)
+{
+ return LONG2NUM(RSTRUCT_LEN(obj));
+}
+
+void
+Init_len(VALUE klass)
+{
+ rb_define_method(klass, "rstruct_len", bug_struct_len, 0);
+}