Skip to content

v3.2.0

Compare
Choose a tag to compare
@localshred localshred released this 01 Aug 23:09
· 647 commits to master since this release

Add Protobuf.ignore_unknown_fields config option (default true).

When setting this option to false, attempts to assign a value to an unknown field on a message will raise a FieldNotDefinedError. Assignment is protected in the initializer (hash argument), Message.encode class method, and the instance-level bracket method Message#[]=.

Decoding messages should ignore this behavior as it is a core tenet of the protocol buffers specification.

[#204, @wesleyk]