diff options
Diffstat (limited to 'ext/-test-/struct/len.c')
-rw-r--r-- | ext/-test-/struct/len.c | 13 |
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 0000000000..6153c720b2 --- /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); +} |