Method: #nulls

Defined in:
src/ruby/pb/test/client.rb,
src/ruby/pb/test/server.rb
more...

#nulls(l) ⇒ Object

produces a string of null chars (0) of length l.

[View source]

173
174
175
176
# File 'src/ruby/pb/test/client.rb', line 173

def nulls(l)
  fail 'requires #{l} to be +ve' if l < 0
  [].pack('x' * l).force_encoding('ascii-8bit')
end