From: matz@... (Yukihiro Matsumoto) Date: 2002-08-09T00:27:18+09:00 Subject: Re: struct needs to be a constant? Hi, In message "RE: struct needs to be a constant?" on 02/08/08, "Berger, Daniel" writes: |> sProto = |> rb_struct_define("ProtoStruct","name","aliases","number",0); |> rb_define_const(cNetProto, "ProtoStruct", sProto); | |Actually, it looks like either a bug or a behaviorial change in 1.7.2. I |don't get this error with 1.6.7. You have to supply a constant name for the first argument, so that "Proto::ProtoStruct" is not a sufficient name for the struct. 1.7 has stricter check for names. If you don't want define class under Struct (i.e. Struct::ProtoStruct), you don't have to give it a name: sProto = rb_struct_define(0,"name","aliases","number",0); rb_define_const(cNetProto, "ProtoStruct", sProto); matz.