ruby-protobuf / protobuf

A pure ruby implementation of Google's Protocol Buffers
https://github.com/ruby-protobuf
MIT License
463 stars 101 forks source link

Bugfix: enum_for_tags returns nil if tag nil #352

Closed evanboho closed 7 years ago

evanboho commented 7 years ago

This fixes https://github.com/ruby-protobuf/protobuf/issues/265 Bug: calling to_i on nil returns 0, and so will return an erroneous value if the enum is zero-indexed.

liveh2o commented 7 years ago

Looks good to me. :shipit: