Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling .to_s on a frozen proto will raise #400

Open
malmckay opened this issue Aug 4, 2019 · 0 comments
Open

Calling .to_s on a frozen proto will raise #400

malmckay opened this issue Aug 4, 2019 · 0 comments

Comments

@malmckay
Copy link

malmckay commented Aug 4, 2019

Failing spec here → malmckay#1

71b2fc0#diff-ef5972b95ab815a1753b6e1677178dac introduced an instance variable. For a frozen proto, setting that instance variable during encoding will raise.

Example stack trace:

     FrozenError:
       can't modify frozen Protobuf_unittest::TestAllTypes
     # ./lib/protobuf/message/fields.rb:30:in `_protobuf_message_unset_required_field_tags'
     # ./lib/protobuf/message.rb:73:in `each_field_for_serialization'
     # ./lib/protobuf/encoder.rb:4:in `encode'
     # ./lib/protobuf/message/serialization.rb:60:in `encode_to'
     # ./lib/protobuf/message/serialization.rb:53:in `encode'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant