Commit 3c547fcd authored by Hao Nguyen's avatar Hao Nguyen

Lower the severity of lower-case ruby enum to warning. Add conformance test for…

Lower the severity of lower-case ruby enum to warning. Add conformance test for allow_alias with lower_case enums
parent b0f6035f
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment