Skip to content

Make it possible to have lowercase enums in Ruby #1965

@CarlosHdez

Description

@CarlosHdez

I have an enum that is something like this

enum status {
   active = 0;
   paused = 1;
}

My issue is when compiling it to a .rb I get a typeError due to this line
https://github.com/google/protobuf/blob/f53f911793c3024976f80211e0c976f5cc51f88d/ruby/ext/google/protobuf_c/message.c#L546
I get it is a standart to use uppercase for Ruby constants, but it is not used only on Ruby and changing all my constants is not a real option for me as my project is already big.
Is there a way to bypass that error.
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions