diff options
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -39,6 +39,9 @@ rb_struct_s_members(VALUE klass) if (NIL_P(members)) { rb_raise(rb_eTypeError, "uninitialized struct"); } + if (TYPE(members) != T_ARRAY) { + rb_raise(rb_eTypeError, "corrupted struct"); + } return members; } |