Merge pull request #4345 from murgatroid99/ruby_interop_bytes_encoding

Fix encoding for bytes fields in ruby interop client
pull/4357/head
Michael Lumish 9 years ago
commit e1719ee01d
  1. 2
      src/ruby/pb/test/client.rb
  2. 2
      src/ruby/pb/test/server.rb

@ -160,7 +160,7 @@ end
# produces a string of null chars (\0) of length l.
def nulls(l)
fail 'requires #{l} to be +ve' if l < 0
[].pack('x' * l).force_encoding('utf-8')
[].pack('x' * l).force_encoding('ascii-8bit')
end
# a PingPongPlayer implements the ping pong bidi test.

@ -126,7 +126,7 @@ end
# produces a string of null chars (\0) of length l.
def nulls(l)
fail 'requires #{l} to be +ve' if l < 0
[].pack('x' * l).force_encoding('utf-8')
[].pack('x' * l).force_encoding('ascii-8bit')
end
# A EnumeratorQueue wraps a Queue yielding the items added to it via each_item.

Loading…
Cancel
Save