localshred/protobuf — pull request #86 by localshred (2013-04-16 17:19:58+00:00)
Title: Check for dup field tags/names in define_field

The rprotoc generator is duped by duplicate field names when you extend the
same message from within different scopes:

message Foo {
...
}

message Bar {
extend Foo {
optional Protobuf::Field::Int32Field, :foo, 100
}
}

message Baz {
extend Foo {
optional Protobuf::Field::Int32Field, :foo, 101
}
}

The fix is simply to check on each Message.define_field call for fields that
already exist with the same name (regular or extension fields).

Fixes #70