Lower the severity of lower-case ruby enum to warning. Add conformance test for allow_alias with lower_case enums
This commit is contained in:
parent
b0f6035fd4
commit
3c547fcdf3
@ -697,6 +697,11 @@ VALUE build_module_from_enumdesc(EnumDescriptor* enumdesc) {
|
||||
upb_enum_next(&it)) {
|
||||
const char* name = upb_enum_iter_name(&it);
|
||||
int32_t value = upb_enum_iter_number(&it);
|
||||
if (name[0] < 'A' || name[0] > 'Z') {
|
||||
rb_warn("Enum value '%s' does not start with an uppercase letter "
|
||||
"as is required for Ruby constants.",
|
||||
name);
|
||||
}
|
||||
rb_define_const(mod, name, INT2NUM(value));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user