localshred/protobuf — pull request #203 by zachmargolis (2014-07-31 00:24:54+00:00)
Title: Make sure all enum values have names (including defaults)

A common pattern for us is

```ruby
message.enum_field.name
```

but with an unset field, this ends up being a plain ol' Fixnum, not an instance of `Protobuf::Enum`, and this blows up!

```ruby
message.enum_field.name
# NoMethodError: undefined method `name' for 0:Fixnum
```

This change lets us treat defaults as if they had names, simplifying our code.

cc @tamird