protobuf-ruby/beefcake — pull request #39 by bkerley (2013-12-10 21:18:08+00:00)
Title: force_encoding throws "Can't modify frozen String"

Hit this from three riemann-ruby-client users today; think it's related to a change introduced with 0.4.0. Oddly, .frozen? on these strings apparently returns false, so I'm not sure... what's going on,

```
RuntimeError can't modify frozen String
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:110:in `force_encoding'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:110:in `append_string'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake/buffer/encode.rb:13:in `append'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:102:in `block in encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:79:in `block in encode'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `encode'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:94:in `block in encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:90:in `encode!'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:79:in `block in encode'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `each'
/Users/daniel/.gem/ruby/2.0.0/gems/beefcake-0.4.0/lib/beefcake.rb:72:in `encode'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:40:in `block in send_maybe_recv'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:57:in `block in with_connection'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:54:in `synchronize'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:54:in `with_connection'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client/udp.rb:39:in `send_maybe_recv'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client.rb:86:in `send_maybe_recv'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-client-0.2.2/lib/riemann/client.rb:49:in `<<'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:71:in `block in report'
/Users/daniel/.rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:70:in `report'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/bin/riemann-riak:187:in `check_stats'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/bin/riemann-riak:231:in `tick'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:90:in `block in run'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:88:in `loop'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:88:in `run'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/lib/riemann/tools.rb:11:in `run'
/Users/daniel/.gem/ruby/2.0.0/gems/riemann-tools-0.1.4/bin/riemann-riak:237:in `'
/Users/daniel/.gem/ruby/2.0.0/bin/riemann-riak:23:in `load'
/Users/daniel/.gem/ruby/2.0.0/bin/riemann-riak:23:in `

'
```