localshred/protobuf — pull request #54 by localshred (2013-01-15 06:49:49+00:00)
Title: Unacceptable value for Protobuf::Field::String field

Protocol file:

```
package search;

message VideoQuery {
required string query = 1;
}
```

Generated file:

```
##
# This file is auto-generated. DO NOT EDIT!
#
require 'protobuf/message'

module Search

##
# Message Classes
#
class VideoQuery < ::Protobuf::Message; end

##
# Message Fields
#
class VideoQuery
required ::Protobuf::Field::StringField, :query, 1
end

end
```

Code throwing error:
```
[4] pry(main)> query = Search::VideoQuery.new
=> {}
[5] pry(main)> query.query = "A"
TypeError: unacceptable value A for type Protobuf::Field::StringField field query
from /Users/jeremy/.rvm/gems/ruby-1.9.3-p286/gems/protobuf-2.6.2/lib/protobuf/field/bytes_field.rb:40:in `rescue in block (2 levels) in define_setter'
```